Files
react-test/docs/data/system/grid/GridTemplateAreas.tsx.preview

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
534 B
Plaintext
Raw Normal View History

2025-12-12 14:26:25 +09:00
<Box
sx={{
display: 'grid',
gridTemplateColumns: 'repeat(4, 1fr)',
gap: 1,
gridTemplateRows: 'auto',
gridTemplateAreas: `"header header header header"
"main main . sidebar"
"footer footer footer footer"`,
}}
>
<Box sx={{ gridArea: 'header', bgcolor: 'primary.main' }}>Header</Box>
<Box sx={{ gridArea: 'main', bgcolor: 'secondary.main' }}>Main</Box>
<Box sx={{ gridArea: 'sidebar', bgcolor: 'error.main' }}>Sidebar</Box>
<Box sx={{ gridArea: 'footer', bgcolor: 'warning.dark' }}>Footer</Box>
</Box>