Files
react-test/docs/data/joy/components/card/MediaCover.js
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

59 lines
1.7 KiB
JavaScript

import Box from '@mui/joy/Box';
import Card from '@mui/joy/Card';
import CardCover from '@mui/joy/CardCover';
import CardContent from '@mui/joy/CardContent';
import Typography from '@mui/joy/Typography';
export default function MediaCover() {
return (
<Box
component="ul"
sx={{ display: 'flex', gap: 2, flexWrap: 'wrap', p: 0, m: 0 }}
>
<Card component="li" sx={{ minWidth: 300, flexGrow: 1 }}>
<CardCover>
<img
src="https://images.unsplash.com/photo-1502657877623-f66bf489d236?auto=format&fit=crop&w=800"
srcSet="https://images.unsplash.com/photo-1502657877623-f66bf489d236?auto=format&fit=crop&w=800&dpr=2 2x"
loading="lazy"
alt=""
/>
</CardCover>
<CardContent>
<Typography
level="body-lg"
textColor="#fff"
sx={{ fontWeight: 'lg', mt: { xs: 12, sm: 18 } }}
>
Image
</Typography>
</CardContent>
</Card>
<Card component="li" sx={{ minWidth: 300, flexGrow: 1 }}>
<CardCover>
<video
autoPlay
loop
muted
poster="https://assets.codepen.io/6093409/river.jpg"
>
<source
src="https://assets.codepen.io/6093409/river.mp4"
type="video/mp4"
/>
</video>
</CardCover>
<CardContent>
<Typography
level="body-lg"
textColor="#fff"
sx={{ fontWeight: 'lg', mt: { xs: 12, sm: 18 } }}
>
Video
</Typography>
</CardContent>
</Card>
</Box>
);
}