* paste inside the viewport

* Buttons in top left panel aren't horizontally centered
This commit is contained in:
Abhishek Kulshrestha 2020-01-17 23:53:41 +05:30 committed by Lipis
parent b2d3d6eca3
commit 31403ab373
2 changed files with 18 additions and 5 deletions

View File

@ -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>

View File

@ -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,