diff --git a/components/Backdrop/Backdrop.tsx b/components/Backdrop/Backdrop.tsx index a6ae96641..60ce3af84 100644 --- a/components/Backdrop/Backdrop.tsx +++ b/components/Backdrop/Backdrop.tsx @@ -1,15 +1,28 @@ -import { FC } from 'react' +import { FC, useEffect } from 'react' import { createPortal } from 'react-dom' +import { useTransition } from 'react-transition-state' export const Backdrop: FC<{ onClick: (() => void) | undefined className?: string | undefined }> = (props) => { const { onClick, className } = props + const [{ status }, toggle] = useTransition({ + timeout: 500, + preEnter: true, + }) + + useEffect(() => { + toggle(true) + }, [toggle]) return createPortal(
, document.getElementById('backdrop-root')! diff --git a/components/SideNavbar/SideNavbar.tsx b/components/SideNavbar/SideNavbar.tsx index 1441cc1be..6b1114c7f 100644 --- a/components/SideNavbar/SideNavbar.tsx +++ b/components/SideNavbar/SideNavbar.tsx @@ -18,7 +18,10 @@ export const SideNavbar: FC<{}> = () => { return ( <> -