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
930 B
TypeScript
37 lines
930 B
TypeScript
import { styled } from '@mui/material/styles';
|
|
import Grid from '@mui/material/GridLegacy';
|
|
import Paper from '@mui/material/Paper';
|
|
import Box from '@mui/material/Box';
|
|
|
|
const Item = styled(Paper)(({ theme }) => ({
|
|
backgroundColor: '#fff',
|
|
...theme.typography.body2,
|
|
padding: theme.spacing(1),
|
|
textAlign: 'center',
|
|
color: (theme.vars ?? theme).palette.text.secondary,
|
|
...theme.applyStyles('dark', {
|
|
backgroundColor: '#1A2027',
|
|
}),
|
|
}));
|
|
|
|
export default function RowAndColumnSpacing() {
|
|
return (
|
|
<Box sx={{ width: '100%' }}>
|
|
<Grid container rowSpacing={1} columnSpacing={{ xs: 1, sm: 2, md: 3 }}>
|
|
<Grid item xs={6}>
|
|
<Item>1</Item>
|
|
</Grid>
|
|
<Grid item xs={6}>
|
|
<Item>2</Item>
|
|
</Grid>
|
|
<Grid item xs={6}>
|
|
<Item>3</Item>
|
|
</Grid>
|
|
<Grid item xs={6}>
|
|
<Item>4</Item>
|
|
</Grid>
|
|
</Grid>
|
|
</Box>
|
|
);
|
|
}
|