Skip to content

Commit a76b21e

Browse files
committed
fix: leverage ink 4's flexWrap in the dashboard grid
1 parent 47b9e97 commit a76b21e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Diff for: plugins/plugin-codeflare-dashboard/src/components/Dashboard/Grid.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,12 @@ export default class Grid extends React.PureComponent<GridProps> {
208208
const flexDirection = this.legendPosition === "below" ? "column" : "row"
209209
const alignItems = this.legendPosition === "below" ? "center" : "center"
210210
const legendBoxProps = this.legendPosition === "below" ? { marginTop: 1 } : { marginLeft: 2 }
211+
const flexWrap = this.legendPosition === "right" ? "wrap" : "nowrap"
211212

212213
return (
213214
<Box
214215
flexDirection={flexDirection}
216+
flexWrap={flexWrap}
215217
alignItems={alignItems}
216218
justifyContent="center"
217219
paddingTop={1}

Diff for: plugins/plugin-codeflare-dashboard/src/components/Dashboard/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ export default class Dashboard extends React.PureComponent<Props, State> {
277277
/** Render the grids */
278278
private grids() {
279279
return this.gridRows().map((row, ridx) => (
280-
<Box key={ridx} justifyContent="space-around">
280+
<Box key={ridx} justifyContent="space-around" flexWrap="wrap">
281281
{row.map(({ grid, widx }) => (
282282
<Box key={grid.title} marginLeft={1}>
283283
<Grid

0 commit comments

Comments
 (0)