import AppBar from "@material-ui/core/AppBar" ; import { drawerCollapsedWidth , drawerWidth } from "../../core/config/layout" ; import { useSettings } from "../../core/contexts/SettingsProvider" ; type AdminAppBarProps = { children : React . ReactNode ; } ; const AdminAppBar = ( { children } ) => { const { collapsed } = useSettings ( ) ; const width = collapsed ? drawerCollapsedWidth : drawerWidth ; return ( < AppBar color = "default" position = "fixed" sx = { { width : { lg : `calc(100% - ${ width }px)` } , marginLeft : { lg : width } , } } > { children } < /AppBar>); } ; export default AdminAppBar ;