move hover to stack

This commit is contained in:
Alex Holliday
2025-02-27 14:15:52 -08:00
parent 69f39e76a0
commit 7d3ea8ac19

View File

@@ -28,17 +28,6 @@ const StatusPagesTable = ({ data }) => {
navigate(url);
}
},
getCellSx: (row) => {
return {
...(row.isPublished && {
"&.MuiTableCell-root:hover": {
backgroundColor: `${theme.palette.primary.light}`,
cursor: "pointer",
borderRadius: 1,
},
}),
};
},
render: (row) => {
const content = row.isPublished ? `/${row.url}` : "Unpublished";
return (
@@ -46,6 +35,18 @@ const StatusPagesTable = ({ data }) => {
direction="row"
alignItems="center"
gap={theme.spacing(2)}
paddingLeft={theme.spacing(2)}
paddingRight={theme.spacing(2)}
borderRadius={theme.spacing(4)}
sx={{
...(row.isPublished && {
":hover": {
backgroundColor: `${theme.palette.primary.light}`,
cursor: "pointer",
borderRadius: 1,
},
}),
}}
>
<Typography>{content}</Typography>
{row.isPublished && <ArrowOutwardIcon />}