const Layout = () => { const { width, enableResize } = useResize(200); return ( <Drawer variant="permanent" open PaperProps={{ style: { width } }} > {drawer} <div style={{ position: absolute, width: '2px', top: '0', right: '-1px', bottom: '0', cursor: 'col-resize' }} onMouseDown={enableResize} /> </Drawer> )