import Drawer from "@material-ui/core/Drawer"; import Hidden from "@material-ui/core/Hidden"; import { createStyles, Theme, withStyles, WithStyles } from "@material-ui/core/styles"; import React from "react"; import { drawerWidth } from "./consts"; const styles = (theme: Theme) => createStyles({ drawerDesktop: { backgroundColor: theme.palette.background.paper, border: "none", height: "100vh", padding: `${theme.spacing.unit * 2}px ${theme.spacing.unit * 4}px`, position: "fixed" as "fixed", width: drawerWidth }, drawerMobile: { padding: `${theme.spacing.unit * 2}px ${theme.spacing.unit * 4}px`, width: drawerWidth, } }); interface ResponsiveDrawerProps extends WithStyles { children?: React.ReactNode; open: boolean; onClose?(); } const ResponsiveDrawer = withStyles(styles, { name: "ResponsiveDrawer" })( ({ children, classes, onClose, open }: ResponsiveDrawerProps) => ( <> {children} {children} ) ); export default ResponsiveDrawer;