Chore: frontend infrastructure upgrade (#16420)
Co-authored-by: NFish <douxc512@gmail.com> Co-authored-by: zxhlyh <jasonapring2015@outlook.com> Co-authored-by: twwu <twwu@dify.ai> Co-authored-by: jZonG <jzongcode@gmail.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Fragment, type ReactNode } from 'react'
|
||||
import { Transition } from '@headlessui/react'
|
||||
import type { ReactNode } from 'react'
|
||||
import { Transition, TransitionChild } from '@headlessui/react'
|
||||
import classNames from '@/utils/classnames'
|
||||
|
||||
type ContentDialogProps = {
|
||||
@@ -19,39 +19,31 @@ const ContentDialog = ({
|
||||
<Transition
|
||||
show={show}
|
||||
as="div"
|
||||
className="absolute left-0 top-0 w-full h-full z-20 p-2 box-border"
|
||||
className="absolute left-0 top-0 z-20 box-border h-full w-full p-2"
|
||||
>
|
||||
<Transition.Child
|
||||
as={Fragment}
|
||||
enter="ease-out duration-300"
|
||||
enterFrom="opacity-0"
|
||||
enterTo="opacity-100"
|
||||
leave="ease-in duration-200"
|
||||
leaveFrom="opacity-100"
|
||||
leaveTo="opacity-0"
|
||||
>
|
||||
<TransitionChild>
|
||||
<div
|
||||
className="absolute left-0 inset-0 w-full bg-app-detail-overlay-bg"
|
||||
className={classNames(
|
||||
'absolute left-0 inset-0 w-full bg-app-detail-overlay-bg',
|
||||
'duration-300 ease-in data-[closed]:opacity-0',
|
||||
'data-[enter]:opacity-100',
|
||||
'data-[leave]:opacity-0',
|
||||
)}
|
||||
onClick={onClose}
|
||||
/>
|
||||
</Transition.Child>
|
||||
</TransitionChild>
|
||||
|
||||
<Transition.Child
|
||||
as={Fragment}
|
||||
enter="transform transition ease-out duration-300"
|
||||
enterFrom="-translate-x-full"
|
||||
enterTo="translate-x-0"
|
||||
leave="transform transition ease-in duration-200"
|
||||
leaveFrom="translate-x-0"
|
||||
leaveTo="-translate-x-full"
|
||||
>
|
||||
<TransitionChild>
|
||||
<div className={classNames(
|
||||
'absolute left-0 w-full bg-app-detail-bg border-r border-divider-burn',
|
||||
'duration-100 ease-in data-[closed]:-translate-x-full',
|
||||
'data-[enter]:ease-out data-[enter]:duration-300 data-[enter]:translate-x-0',
|
||||
'data-[leave]:ease-in data-[leave]:duration-200 data-[leave]:-translate-x-full',
|
||||
className,
|
||||
)}>
|
||||
{children}
|
||||
</div>
|
||||
</Transition.Child>
|
||||
</TransitionChild>
|
||||
</Transition>
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user