From defaa2ccd62963854068a43addf067670cdb8375 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Thu, 16 Sep 2021 20:51:25 -0400 Subject: [PATCH] few more fixes --- src/Sidebar/ui/SidebarRoot.tsx | 52 ++++++++++------------------------ src/ui/React/Theme.tsx | 7 ----- 2 files changed, 15 insertions(+), 44 deletions(-) diff --git a/src/Sidebar/ui/SidebarRoot.tsx b/src/Sidebar/ui/SidebarRoot.tsx index f782c4f4e..6b4681a43 100644 --- a/src/Sidebar/ui/SidebarRoot.tsx +++ b/src/Sidebar/ui/SidebarRoot.tsx @@ -62,7 +62,7 @@ import { Page, routing } from "../../ui/navigationTracking"; const drawerWidth = 240; const openedMixin = (theme: Theme): CSSObject => ({ - width: drawerWidth, + width: theme.spacing(31), transition: theme.transitions.create("width", { easing: theme.transitions.easing.sharp, duration: theme.transitions.duration.enteringScreen, @@ -76,14 +76,14 @@ const closedMixin = (theme: Theme): CSSObject => ({ duration: theme.transitions.duration.leavingScreen, }), overflowX: "hidden", - width: `calc(${theme.spacing(7)} + 1px)`, + width: `calc(${theme.spacing(2)} + 1px)`, [theme.breakpoints.up("sm")]: { - width: `calc(${theme.spacing(9)} + 1px)`, + width: `calc(${theme.spacing(7)} + 1px)`, }, }); const Drawer = styled(MuiDrawer, { shouldForwardProp: (prop) => prop !== "open" })(({ theme, open }) => ({ - width: drawerWidth, + width: theme.spacing(31), flexShrink: 0, whiteSpace: "nowrap", boxSizing: "border-box", @@ -99,30 +99,6 @@ const Drawer = styled(MuiDrawer, { shouldForwardProp: (prop) => prop !== "open" const useStyles = makeStyles((theme: Theme) => createStyles({ - drawer: { - width: theme.spacing(31), - flexShrink: 0, - display: "flex", - whiteSpace: "nowrap", - }, - drawerOpen: { - width: theme.spacing(31), - transition: theme.transitions.create("width", { - easing: theme.transitions.easing.sharp, - duration: theme.transitions.duration.enteringScreen, - }), - }, - drawerClose: { - transition: theme.transitions.create("width", { - easing: theme.transitions.easing.sharp, - duration: theme.transitions.duration.leavingScreen, - }), - overflowX: "hidden", - width: theme.spacing(7) + 1, - [theme.breakpoints.up("sm")]: { - width: theme.spacing(9) + 1, - }, - }, active: { borderLeft: "3px solid " + colors.primary, }, @@ -381,17 +357,19 @@ export function SidebarRoot(props: IProps): React.ReactElement { - {!open ? : } + + {!open ? : } + Bitburner v{CONSTANTS.Version}} /> setHackingOpen((old) => !old)}> - + Hacking} /> - {hackingOpen ? : } + {hackingOpen ? : } @@ -473,10 +451,10 @@ export function SidebarRoot(props: IProps): React.ReactElement { setCharacterOpen((old) => !old)}> - + Character} /> - {characterOpen ? : } + {characterOpen ? : } setWorldOpen((old) => !old)}> - + World} /> - {worldOpen ? : } + {worldOpen ? : } setHelpOpen((old) => !old)}> - + Help} /> - {helpOpen ? : } + {helpOpen ? : }