mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
fixed scroll locks on SidebarWrapper
This commit is contained in:
parent
f354b4aacc
commit
892e40c87e
2 changed files with 5 additions and 2 deletions
|
@ -3,6 +3,7 @@ import styles from "./styles.module.scss";
|
|||
import { clearAllBodyScrollLocks, disableBodyScroll } from "body-scroll-lock";
|
||||
import { Icon } from "~/components/input/Icon";
|
||||
import { LoaderCircle } from "~/components/input/LoaderCircle";
|
||||
import { useCloseOnEscape } from "~/utils/hooks";
|
||||
|
||||
interface IProps {
|
||||
children: React.ReactChild;
|
||||
|
@ -39,6 +40,8 @@ const BetterScrollDialog: FC<IProps> = ({
|
|||
return () => clearAllBodyScrollLocks();
|
||||
}, [ref]);
|
||||
|
||||
useCloseOnEscape(onClose);
|
||||
|
||||
return (
|
||||
<div className={styles.wrap} ref={ref}>
|
||||
{backdrop && <div className={styles.backdrop}>{backdrop}</div>}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue