Skip to content

Commit 58b13af

Browse files
committed
Make children of uniform width
1 parent 46b53e3 commit 58b13af

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

src/components/TreeView/TreeDepiction/ChildrenRow.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,15 @@ export default function ChildrenRow(props: TreeRowProps): ReactElement {
147147
<Grid2 container justifyContent="center">
148148
{braceRow()}
149149
</Grid2>
150-
<Grid2 container justifyContent="center" spacing={2}>
150+
<Grid2 container spacing={2}>
151151
{props.currentDomain.children.map((child) => (
152-
<DomainTileButton
153-
direction={Direction.Down}
154-
domain={child}
155-
key={child.id}
156-
onClick={(d) => props.animate(d)}
157-
/>
152+
<Grid2 key={child.id} size={{ xs: 4, sm: 3, md: 2 }}>
153+
<DomainTileButton
154+
direction={Direction.Down}
155+
domain={child}
156+
onClick={(d) => props.animate(d)}
157+
/>
158+
</Grid2>
158159
))}
159160
</Grid2>
160161
</>

src/components/TreeView/TreeDepiction/DomainTileButton.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ export default function DomainTileButton(
9696
height: "95%",
9797
insetInlineStart: 0,
9898
padding: "5px",
99+
width: "95%",
99100
}}
100101
tabIndex={-1}
101102
variant={"outlined"}

src/components/TreeView/TreeDepiction/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { parent } from "resources/tree";
1313
import { useWindowSize } from "utilities/useWindowSize";
1414

1515
export default function TreeDepiction(props: TreeDepictionProps): ReactElement {
16-
const showTree = useMediaQuery<Theme>((th) => th.breakpoints.up("sm"));
16+
const showTree = true; //useMediaQuery<Theme>((th) => th.breakpoints.up("sm"));
1717

1818
const [colWidth, setColWidth] = useState(0);
1919

0 commit comments

Comments
 (0)