Bug 389 (#428)
* paste inside the viewport * Buttons in top left panel aren't horizontally centered
This commit is contained in:
parent
b2d3d6eca3
commit
31403ab373
@ -6,24 +6,37 @@ type StackProps = {
|
|||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
gap?: number;
|
gap?: number;
|
||||||
align?: "start" | "center" | "end" | "baseline";
|
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 (
|
return (
|
||||||
<div
|
<div
|
||||||
className="Stack Stack_horizontal"
|
className="Stack Stack_horizontal"
|
||||||
style={{ "--gap": gap, alignItems: align } as React.CSSProperties}
|
style={
|
||||||
|
{
|
||||||
|
"--gap": gap,
|
||||||
|
alignItems: align,
|
||||||
|
justifyContent
|
||||||
|
} as React.CSSProperties
|
||||||
|
}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ColStack({ children, gap, align }: StackProps) {
|
function ColStack({ children, gap, align, justifyContent }: StackProps) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="Stack Stack_vertical"
|
className="Stack Stack_vertical"
|
||||||
style={{ "--gap": gap, justifyItems: align } as React.CSSProperties}
|
style={
|
||||||
|
{
|
||||||
|
"--gap": gap,
|
||||||
|
justifyItems: align,
|
||||||
|
justifyContent
|
||||||
|
} as React.CSSProperties
|
||||||
|
}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
|
@ -460,7 +460,7 @@ export class App extends React.Component<{}, AppState> {
|
|||||||
private renderCanvasActions() {
|
private renderCanvasActions() {
|
||||||
return (
|
return (
|
||||||
<Stack.Col gap={4}>
|
<Stack.Col gap={4}>
|
||||||
<Stack.Row gap={1}>
|
<Stack.Row justifyContent={"space-between"}>
|
||||||
{this.actionManager.renderAction(
|
{this.actionManager.renderAction(
|
||||||
"loadScene",
|
"loadScene",
|
||||||
elements,
|
elements,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user