diff --git a/striker-ui/components/Grid.tsx b/striker-ui/components/Grid.tsx index d7763c8a..be15ef2f 100644 --- a/striker-ui/components/Grid.tsx +++ b/striker-ui/components/Grid.tsx @@ -1,9 +1,10 @@ -import { Grid as MUIGrid } from '@mui/material'; +import { Box as MUIBox, Grid as MUIGrid } from '@mui/material'; import { FC, useMemo } from 'react'; const Grid: FC = ({ calculateItemBreakpoints = () => ({ xs: 1 }), layout, + wrapperBoxProps, ...restGridProps }) => { const itemElements = useMemo(() => { @@ -24,9 +25,12 @@ const Grid: FC = ({ }, [calculateItemBreakpoints, layout]); return ( - - {itemElements} - + // Make Grid compatible with FlexBox by adding an extra empty wrapper. + + + {itemElements} + + ); }; diff --git a/striker-ui/types/Grid.d.ts b/striker-ui/types/Grid.d.ts index 01880dca..d0b151aa 100644 --- a/striker-ui/types/Grid.d.ts +++ b/striker-ui/types/Grid.d.ts @@ -9,6 +9,7 @@ type GridOptionalProps = { ) => Partial< Pick >; + wrapperBoxProps?: import('@mui/material').BoxProps; }; type GridProps = import('@mui/material').GridProps &