Skip to content

Commit 256f482

Browse files
committed
frontend: Sidebar: adjust styles to use new theme tokens
Signed-off-by: Oleksandr Dubenko <[email protected]>
1 parent 13cabea commit 256f482

File tree

1 file changed

+8
-26
lines changed

1 file changed

+8
-26
lines changed

frontend/src/components/Sidebar/Sidebar.tsx

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ function SidebarToggleButton() {
9595
<ActionButton
9696
iconButtonProps={{
9797
size: 'small',
98+
sx: theme => ({
99+
color: theme.palette.sidebar.color,
100+
}),
98101
}}
99102
onClick={() => {
100103
dispatch(setWhetherSidebarOpen(!isOpen));
@@ -319,29 +322,7 @@ export const PureSidebar = memo(
319322
</List>
320323
</Grid>
321324
<Grid item>
322-
<Box
323-
textAlign="center"
324-
p={0}
325-
sx={theme => ({
326-
'&, & *, & svg': {
327-
color: theme.palette.sidebarLink.color,
328-
},
329-
'& .MuiButton-root': {
330-
color: theme.palette.sidebarButtonInLinkArea.color,
331-
'&:hover': {
332-
background: theme.palette.sidebarButtonInLinkArea.hover.background,
333-
},
334-
},
335-
'& .MuiButton-containedPrimary': {
336-
background: theme.palette.sidebarButtonInLinkArea.primary.background,
337-
'&:hover': {
338-
background: theme.palette.sidebarButtonInLinkArea.hover.background,
339-
},
340-
},
341-
})}
342-
>
343-
{linkArea}
344-
</Box>
325+
<Box textAlign="center">{linkArea}</Box>
345326
</Grid>
346327
</Grid>
347328
</>
@@ -385,7 +366,8 @@ export const PureSidebar = memo(
385366
const drawer = {
386367
width: drawerWidth,
387368
flexShrink: 0,
388-
background: theme.palette.sidebarBg,
369+
background: theme.palette.sidebar.background,
370+
color: theme.palette.sidebar.color,
389371
};
390372

391373
const drawerOpen = {
@@ -394,7 +376,7 @@ export const PureSidebar = memo(
394376
easing: theme.transitions.easing.sharp,
395377
duration: theme.transitions.duration.enteringScreen,
396378
}),
397-
background: theme.palette.sidebarBg,
379+
background: theme.palette.sidebar.background,
398380
};
399381

400382
const drawerClose = {
@@ -404,7 +386,7 @@ export const PureSidebar = memo(
404386
}),
405387
overflowX: 'hidden',
406388
width: adjustedDrawerWidth,
407-
background: theme.palette.sidebarBg,
389+
background: theme.palette.sidebar.background,
408390
};
409391

410392
if (

0 commit comments

Comments
 (0)