diff --git a/web/app/components/app/create-app-dialog/newAppDialog.tsx b/web/app/components/app/create-app-dialog/newAppDialog.tsx deleted file mode 100644 index 33e7d779f5..0000000000 --- a/web/app/components/app/create-app-dialog/newAppDialog.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import { Fragment, useCallback } from 'react' -import type { ReactNode } from 'react' -import { Dialog, DialogPanel, Transition } from '@headlessui/react' -import cn from '@/utils/classnames' - -type DialogProps = { - className?: string - children: ReactNode - show: boolean - onClose?: () => void -} - -const NewAppDialog = ({ - className, - children, - show, - onClose, -}: DialogProps) => { - const close = useCallback(() => onClose?.(), [onClose]) - return ( - - - {/* - - */} - {/* TODO: to new Transition */} - - - - - {/* - - {children} - - */} - {/* TODO: to new Transition */} - - {children} - - - - - - ) -} - -export default NewAppDialog diff --git a/web/app/components/base/fullscreen-modal/index.tsx b/web/app/components/base/fullscreen-modal/index.tsx index 9a76dfa62b..f53ebc5b29 100644 --- a/web/app/components/base/fullscreen-modal/index.tsx +++ b/web/app/components/base/fullscreen-modal/index.tsx @@ -1,7 +1,7 @@ import { Dialog, DialogPanel, Transition } from '@headlessui/react' -import { Fragment } from 'react' import { RiCloseLargeLine } from '@remixicon/react' import classNames from '@/utils/classnames' +import { useEffect, useState } from 'react' type IModal = { className?: string @@ -24,62 +24,42 @@ export default function FullScreenModal({ closable = false, overflowVisible = false, }: IModal) { + const [showTransition, setShowTransition] = useState(false) + useEffect(() => { + if (!open) { + setShowTransition(false) + return + } + setTimeout(() => { + setShowTransition(true) + }, 100) + }, [open]) return ( - - - {/* - - */} - {/* TODO: to new Transition */} - + + + + - { - e.preventDefault() - e.stopPropagation() - }} - > - - {/* - - {closable - && { - e.stopPropagation() - onClose() - }}> - - } - {children} - - */} - {/* TODO: to new Transition */} + { + e.preventDefault() + e.stopPropagation() + }} + > + + {closable @@ -94,9 +74,9 @@ export default function FullScreenModal({ } {children} - + - - + + ) }