excalidraw/src/components/Stack.tsx
David Luzar 6892348c3d Revert 400 and 420 (#422)
* revert #400 font file

* Revert "Revert "Set scale for export images (#416)" (#420)"

This reverts commit d603921234.
2020-01-17 16:43:24 +02:00

36 lines
692 B
TypeScript

import "./Stack.css";
import React from "react";
type StackProps = {
children: React.ReactNode;
gap?: number;
align?: "start" | "center" | "end" | "baseline";
};
function RowStack({ children, gap, align }: StackProps) {
return (
<div
className="Stack Stack_horizontal"
style={{ "--gap": gap, alignItems: align } as React.CSSProperties}
>
{children}
</div>
);
}
function ColStack({ children, gap, align }: StackProps) {
return (
<div
className="Stack Stack_vertical"
style={{ "--gap": gap, justifyItems: align } as React.CSSProperties}
>
{children}
</div>
);
}
export default {
Row: RowStack,
Col: ColStack
};