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

38 lines
1.2 KiB
TypeScript

import Card from '@mui/joy/Card';
import CardCover from '@mui/joy/CardCover';
import CardContent from '@mui/joy/CardContent';
import Typography from '@mui/joy/Typography';
import LocationOnRoundedIcon from '@mui/icons-material/LocationOnRounded';
export default function GradientCover() {
return (
<Card sx={{ minHeight: '280px', width: 320 }}>
<CardCover>
<img
src="https://images.unsplash.com/photo-1542773998-9325f0a098d7?auto=format&fit=crop&w=320"
srcSet="https://images.unsplash.com/photo-1542773998-9325f0a098d7?auto=format&fit=crop&w=320&dpr=2 2x"
loading="lazy"
alt=""
/>
</CardCover>
<CardCover
sx={{
background:
'linear-gradient(to top, rgba(0,0,0,0.4), rgba(0,0,0,0) 200px), linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0) 300px)',
}}
/>
<CardContent sx={{ justifyContent: 'flex-end' }}>
<Typography level="title-lg" textColor="#fff">
Yosemite National Park
</Typography>
<Typography
startDecorator={<LocationOnRoundedIcon />}
textColor="neutral.300"
>
California, USA
</Typography>
</CardContent>
</Card>
);
}