Skip to content

Commit

Permalink
fix layout bug (finos#1070)
Browse files Browse the repository at this point in the history
  • Loading branch information
heswell authored Dec 11, 2023
1 parent 63f9f80 commit b57cee5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { rectTuple, uuid } from "@finos/vuu-utils";
import React, { ReactElement } from "react";
import { DropPos } from "../drag-drop";
import { DropTarget } from "../drag-drop/DropTarget";
import { TabLabelFactory } from "../stack";
import { getProp, getProps, nextStep, resetPath, typeOf } from "../utils";
import {
createPlaceHolder,
Expand Down Expand Up @@ -391,7 +390,11 @@ function getStyledComponents(
} = getProps(newComponent);
return [
existingComponent,
React.cloneElement(newComponent, { id, version, style }),
React.cloneElement(newComponent, {
id,
version,
style: { ...style, flex: "1 1 0px" },
}),
];
}
}
14 changes: 6 additions & 8 deletions vuu-ui/packages/vuu-layout/src/stack/Stack.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
.Tabs {
.vuuTabs {
display: flex;
box-sizing: border-box;
flex-direction: column;
}

.Tabs-horizontal {
.vuuTabs-horizontal {
--vuu-tabs-border-style: none solid none none;
flex-direction: row;
}

.Tabs .Toolbar:before {
.vuuTabs .Toolbar:before {
left: 0;
width: 100%;
bottom: 0;
Expand All @@ -19,12 +19,10 @@
background: var(--grey60);
}

.Tabs-tabPanel {
.vuuTabs-tabPanel {
display: flex;
flex: 1;
}

.Tabs-tabPanel > * {
height: 100%;
flex-direction: column;
}

.vuuTabHeader {
Expand Down
2 changes: 1 addition & 1 deletion vuu-ui/packages/vuu-layout/src/stack/Stack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { StackProps } from "./stackTypes";

import "./Stack.css";

const classBase = "Tabs";
const classBase = "vuuTabs";

const getDefaultTabIcon = () => undefined;

Expand Down

0 comments on commit b57cee5

Please sign in to comment.