Files
react-test/docs/data/joy/customization/theme-shadow/CustomShadowOnElement.tsx

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
663 B
TypeScript
Raw Permalink Normal View History

2025-12-12 14:26:25 +09:00
import Button from '@mui/joy/Button';
export default function CustomShadowOnElement() {
return (
<Button
size="lg"
sx={(theme) => ({
boxShadow: theme.shadow.md,
transition: '0.2s',
'--joy-shadowChannel': theme.vars.palette.primary.mainChannel,
'--joy-shadowRing': 'inset 0 -3px 0 rgba(0 0 0 / 0.24)',
'&:hover': {
boxShadow: theme.shadow.lg,
transform: 'translateY(-3px)',
},
'&:active': {
boxShadow: theme.shadow.md,
transform: 'translateY(0px)',
'--joy-shadowRing': '0 0 #000',
},
})}
>
Buy
</Button>
);
}