javascript - Recommended way to have drawer resizable? - Stack Overflow

PHOTO EMBED

Sat Sep 04 2021 04:44:53 GMT+0000 (Coordinated Universal Time)

Saved by @nabilashraf #javascript

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>
)
content_copyCOPY

https://stackoverflow.com/questions/49469834/recommended-way-to-have-drawer-resizable