import SlidingPane from 'react-sliding-pane' import { Resizable, ResizeCallback } from 're-resizable' import useGetWindowDimensions from '../../../lib/hooks/useGetWindowDimensions' type ResizableSidebarProps = { isShow: boolean onClose: () => void children: React.ReactNode } export function ResizableSidebar(props: ResizableSidebarProps): JSX.Element { const windowDimensions = useGetWindowDimensions() const handleResize: ResizeCallback = (_e, _direction, ref) => { if (parseInt(ref.style.width) < 210) { props.onClose() } } return ( {props.children} ) }