Files
react-test/docs/data/joy/components/grid/ChildrenCenteredGrid.tsx
how2ice 005cf56baf
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
init project
2025-12-12 14:26:25 +09:00

42 lines
1.2 KiB
TypeScript

import Avatar from '@mui/joy/Avatar';
import Box from '@mui/joy/Box';
import Grid from '@mui/joy/Grid';
import Typography from '@mui/joy/Typography';
export default function ChildrenCenteredGrid() {
return (
<Box sx={{ flexGrow: 1 }}>
<Grid
container
sx={{
'--Grid-borderWidth': '1px',
borderTop: 'var(--Grid-borderWidth) solid',
borderLeft: 'var(--Grid-borderWidth) solid',
borderColor: 'divider',
'& > div': {
borderRight: 'var(--Grid-borderWidth) solid',
borderBottom: 'var(--Grid-borderWidth) solid',
borderColor: 'divider',
},
}}
>
{['Jimmy', 'Michal', 'Jun', 'Marija'].map((name, index) => (
<Grid
key={name}
sx={{
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
minHeight: 180,
}}
size={{ xs: 12, sm: 6, md: 3 }}
>
<Avatar src={`/static/images/avatar/${index + 1}.jpg`} size="lg" />
<Typography sx={{ ml: 1.5 }}>{name}</Typography>
</Grid>
))}
</Grid>
</Box>
);
}