feat: improve drawer layout

This commit is contained in:
Jeremy Kahn 2022-11-26 09:49:02 -06:00
parent 8ec721bc2f
commit fdf80b8292

View File

@ -28,19 +28,21 @@ export const AppBar = styled(MuiAppBar, {
...(isDrawerOpen && {
width: `calc(100% - ${drawerWidth}px)`,
marginLeft: `${drawerWidth}px`,
transition: theme.transitions.create(['margin', 'width'], {
easing: theme.transitions.easing.easeOut,
duration: theme.transitions.duration.enteringScreen,
}),
}),
...(isPeerListOpen && {
width: `calc(100% - ${peerListWidth}px)`,
marginRight: `${peerListWidth}px`,
}),
...((isDrawerOpen || isPeerListOpen) && {
transition: theme.transitions.create(['margin', 'width'], {
easing: theme.transitions.easing.easeOut,
duration: theme.transitions.duration.enteringScreen,
}),
}),
...(isDrawerOpen &&
isPeerListOpen && {
width: `calc(100% - ${drawerWidth}px - ${peerListWidth}px)`,
}),
}))
interface ShellAppBarProps {