Skip to content
This repository has been archived by the owner on Dec 23, 2024. It is now read-only.

Commit

Permalink
Turn hover off then re-enable in the theme to prevent Mui hover setti…
Browse files Browse the repository at this point in the history
…ngs overriding theme hover settings
  • Loading branch information
Dale Roberts committed Dec 18, 2023
1 parent 9e4a5fa commit 30836b0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 24 deletions.
13 changes: 1 addition & 12 deletions src/components/groups/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -305,18 +305,7 @@ export const GroupList = () => {
<Datagrid
rowClick="show"
bulkActionButtons={false}
sx={{
"& .MuiTableRow-hover": {
"&:hover": {
backgroundColor: clex_secondary_colours_dark["purple"],
color: "white",
},
},
"& .MuiTableCell-root": {
color:"inherit",
}

}}
hover={false}
>
<TextField source="id" label="Group Name" />
<FunctionField label="Compute Usage" render={ComputeUsage} />
Expand Down
12 changes: 1 addition & 11 deletions src/components/users/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,17 +240,7 @@ export const UserList = () => {
<Datagrid
rowClick="show"
bulkActionButtons={false}
sx={{
"& .MuiTableRow-hover": {
"&:hover": {
backgroundColor: clex_secondary_colours_dark["purple"],
color: "white",
},
},
"& .MuiTableCell-root": {
color: "inherit",
},
}}
hover={false}
>
<TextField source="id" label="Username" />
<TextField source="pw_name" label="Name" />
Expand Down
21 changes: 20 additions & 1 deletion src/util/theme/theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,26 @@ const dashboardTheme = {
},
},
},
MuiTableCell: {
styleOverrides: {
root: {
color:"inherit",
}
}
},
RaDatagrid: {
styleOverrides: {
root: {
"& .RaDatagrid-clickableRow": {
":hover": {
backgroundColor: clex_secondary_colours_dark["purple"],
color: "white",
},
}
}
}
},
},
};

export {dashboardTheme};
export {dashboardTheme};

0 comments on commit 30836b0

Please sign in to comment.