Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
37 lines
1011 B
JavaScript
37 lines
1011 B
JavaScript
import Box from '@mui/material/Box';
|
|
|
|
export default function GridTemplateAreas() {
|
|
return (
|
|
<Box
|
|
sx={{
|
|
width: '100%',
|
|
height: '140px',
|
|
color: '#fff',
|
|
'& > .MuiBox-root > .MuiBox-root': {
|
|
p: 1,
|
|
borderRadius: 2,
|
|
fontSize: '0.875rem',
|
|
fontWeight: '700',
|
|
},
|
|
}}
|
|
>
|
|
<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>
|
|
</Box>
|
|
);
|
|
}
|