Fix exiting dialog

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2022-07-30 10:33:44 +02:00
parent 2537088099
commit dc3cc33893
No known key found for this signature in database
GPG key ID: D1D45825D60C24D2

View file

@ -54,7 +54,10 @@ export function Modal({
...rest
}: ModalProps) {
const modalRef = useRef();
const { overlayProps, underlayProps } = useOverlay(rest, modalRef);
const { overlayProps, underlayProps } = useOverlay(
{ ...rest, onClose },
modalRef
);
usePreventScroll();
const { modalProps } = useModal();
const { dialogProps, titleProps } = useDialog(rest, modalRef);