Skip to content

Virtual whiteboard for sketching hand-drawn like diagrams

Bug 389 (#428)

Abhishek Kulshrestha31403ab3735a
diff --git a/src/components/Stack.tsx b/src/components/Stack.tsx
index f1b9c329e1..331c8edcef 100644
--- a/src/components/Stack.tsx
+++ b/src/components/Stack.tsx
@@ -6,24 +6,37 @@ type StackProps = {
children: React.ReactNode;
gap?: number;
align?: "start" | "center" | "end" | "baseline";
+ justifyContent?: "center" | "space-around" | "space-between";
};
-function RowStack({ children, gap, align }: StackProps) {
+function RowStack({ children, gap, align, justifyContent }: StackProps) {
return (
<div
className="Stack Stack_horizontal"
- style={{ "--gap": gap, alignItems: align } as React.CSSProperties}
+ style={
+ {
+ "--gap": gap,
+ alignItems: align,
+ justifyContent
+ } as React.CSSProperties
+ }
>
{children}
</div>
);
}
-function ColStack({ children, gap, align }: StackProps) {
+function ColStack({ children, gap, align, justifyContent }: StackProps) {
return (
<div
className="Stack Stack_vertical"
- style={{ "--gap": gap, justifyItems: align } as React.CSSProperties}
+ style={
+ {
+ "--gap": gap,
+ justifyItems: align,
+ justifyContent
+ } as React.CSSProperties
+ }
>
{children}
</div>
diff --git a/src/index.tsx b/src/index.tsx
index 74d01ee1ab..4fa431a0a9 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -460,7 +460,7 @@ export class App extends React.Component<{}, AppState> {
private renderCanvasActions() {
return (
<Stack.Col gap={4}>
- <Stack.Row gap={1}>
+ <Stack.Row justifyContent={"space-between"}>
{this.actionManager.renderAction(
"loadScene",
elements,