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
32 lines
829 B
JavaScript
32 lines
829 B
JavaScript
import * as React from 'react';
|
|
import Paper from '@mui/material/Paper';
|
|
import Box from '@mui/material/Box';
|
|
import Grid from '@mui/material/Grid';
|
|
import { styled } from '@mui/material/styles';
|
|
|
|
// styled(Grid) should work with nested grids.
|
|
const StyledGrid = styled(Grid)({});
|
|
|
|
export default function StyledGridTest() {
|
|
return (
|
|
<Box sx={{ p: 3, width: 600 }}>
|
|
<Grid container spacing={4}>
|
|
<Grid size={4}>
|
|
<Paper>Item 1</Paper>
|
|
</Grid>
|
|
<StyledGrid container size={4}>
|
|
<StyledGrid size={6}>
|
|
<Paper>Item 2.1</Paper>
|
|
</StyledGrid>
|
|
<Grid size={6}>
|
|
<Paper>Item 2.2</Paper>
|
|
</Grid>
|
|
</StyledGrid>
|
|
<StyledGrid size={4}>
|
|
<Paper>Item 3</Paper>
|
|
</StyledGrid>
|
|
</Grid>
|
|
</Box>
|
|
);
|
|
}
|