feat(doc-item): add hover animation to DocItem card

- Added default styling with hover transition
- Preserves user-defined `sx` if passed
This commit is contained in:
tekh 2025-07-14 09:47:53 +02:00
parent e3c5e84bb7
commit b15b4dc3b1

View File

@ -45,7 +45,7 @@ export function DocItem({
//#endregion //#endregion
const [openViewDoc, setOpenViewDoc] = useState(false); const [openViewDoc, setOpenViewDoc] = useState(false);
const renderTitle = ( const renderTitle = (
<Link <Link
color="inherit" color="inherit"
@ -151,6 +151,15 @@ export function DocItem({
/> />
); );
sx ??= {
cursor: 'pointer',
transition: 'transform 0.3s ease, box-shadow 0.3s ease',
'&:hover': {
transform: 'scale(1.03)',
boxShadow: 6,
}
}
return ( return (
<Card sx={sx} {...other}> <Card sx={sx} {...other}>
<Box <Box