refactoring and minor palette changes

This commit is contained in:
2023-01-08 13:39:34 +01:00
parent 6b6e2386af
commit e590714391
4 changed files with 75 additions and 60 deletions

View File

@@ -0,0 +1,30 @@
import { styled } from '@mui/material';
import MuiDrawer from '@mui/material/Drawer';
const drawerWidth = 240;
export const Drawer = styled(MuiDrawer, { shouldForwardProp: (prop) => prop !== 'open' })(
({ theme, open }) => ({
'& .MuiDrawer-paper': {
position: 'relative',
whiteSpace: 'nowrap',
width: drawerWidth,
transition: theme.transitions.create('width', {
easing: theme.transitions.easing.sharp,
duration: theme.transitions.duration.enteringScreen,
}),
boxSizing: 'border-box',
...(!open && {
overflowX: 'hidden',
transition: theme.transitions.create('width', {
easing: theme.transitions.easing.sharp,
duration: theme.transitions.duration.leavingScreen,
}),
width: theme.spacing(7),
[theme.breakpoints.up('sm')]: {
width: theme.spacing(9),
},
}),
},
}),
);