File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
packages/react-sdk-components/src/components/template/DefaultPage Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 11import { useMemo , Children } from 'react' ;
22import type { ReactNode } from 'react' ;
3+ import { Grid2 } from '@mui/material' ;
34import Banner from '../../designSystemExtension/Banner' ;
45
56export interface CommonPageProps {
@@ -53,6 +54,13 @@ interface DefaultPageProps extends CommonPageProps {
5354 // layoutModel?: GridLayoutModel | undefined;
5455}
5556
57+ const COLUMNS_WIDTHS = {
58+ 'one-column' : [ 12 ] ,
59+ 'two-column' : [ 6 , 6 ] ,
60+ 'narrow-wide' : [ 4 , 8 ] ,
61+ 'wide-narrow' : [ 8 , 4 ]
62+ } ;
63+
5664export default function DefaultPage ( {
5765 layout = 'one-column' ,
5866 children,
@@ -85,4 +93,14 @@ export default function DefaultPage({
8593 />
8694 ) ;
8795 }
96+
97+ return (
98+ < Grid2 container spacing = { 1 } >
99+ { childArray . map ( ( child , index ) => (
100+ < Grid2 key = { index } size = { COLUMNS_WIDTHS [ layout ] [ index ] } >
101+ { child }
102+ </ Grid2 >
103+ ) ) }
104+ </ Grid2 >
105+ ) ;
88106}
You can’t perform that action at this time.
0 commit comments