feat(client): add a sidebar-specific accent colour for dark mode
The sidebar selected-icon colour was sharing primary.main, which read too dark in dark mode. Introduce palette.sidebar.accent (brand green in light mode, a lighter green in dark mode) and route NavItem through it so primary stays brand-green for buttons and the rest of the UI.
This commit is contained in:
1 parent
1bff81c6bb
commit
11ea7dcb3b
3 files changed
+17
-2
No files matched your search
@@ -22,7 +22,9 @@ export const NavItem = ({
|
||||
}) => {
|
||||
const { collapsed } = useSidebar();
|
||||
const theme = useTheme();
|
||||
const iconStroke = selected ? theme.palette.primary.main : theme.palette.text.secondary;
|
||||
const iconStroke = selected
|
||||
? theme.palette.sidebar.accent
|
||||
: theme.palette.text.secondary;
|
||||
|
||||
const buttonBgColor = selected ? theme.palette.action.selected : "transparent";
|
||||
const buttonBgHoverColor = selected
|
||||
@@ -79,7 +81,7 @@ export const NavItem = ({
|
||||
},
|
||||
".MuiListItemButton-root:hover &": {
|
||||
"& svg path, & svg line, & svg polyline, & svg rect, & svg circle": {
|
||||
stroke: theme.palette.primary.main,
|
||||
stroke: theme.palette.sidebar.accent,
|
||||
},
|
||||
},
|
||||
}}
|
||||
|
||||
Reference in new issue
Block a user