import { FC, useRef } from 'react' import s from './Sidebar.module.css' import { Transition } from '@headlessui/react' import { useOverlay, OverlayContainer } from '@react-aria/overlays' import { FocusScope } from '@react-aria/focus' import Portal from '@reach/portal' interface Props { children: any open: boolean onClose: () => void } const Sidebar: FC = ({ children, open = false, onClose }) => { const ref = useRef(null) const { overlayProps } = useOverlay( { isOpen: open, isDismissable: true, onClose: onClose, }, ref ) return (
{children}
) } export default Sidebar