chore: correctly close modals and show toast after creating note from shared text

This commit is contained in:
Aman Harwara
2023-07-13 02:16:54 +05:30
parent 8294d0663f
commit 512b8d9fbc
7 changed files with 50 additions and 9 deletions

View File

@@ -2,6 +2,7 @@ import { mergeRefs } from '@/Hooks/mergeRefs'
import { Dialog, DialogOptions, useDialogStore } from '@ariakit/react'
import { ForwardedRef, forwardRef, ReactNode, useCallback } from 'react'
import { useModalAnimation } from '../Modal/useModalAnimation'
import { DialogWithClose } from '@/Utils/CloseOpenModalsAndPopovers'
type Props = {
isOpen: boolean
@@ -10,8 +11,6 @@ type Props = {
close: () => void
}
type DialogWithClose = HTMLDivElement & { close: () => void }
const ModalOverlay = forwardRef(
(
{ isOpen, children, animationVariant, close, ...props }: Props & Partial<DialogOptions>,