update style

This commit is contained in:
JzoNg 2024-08-26 09:37:04 +08:00
parent 687661eef7
commit 912030c9a1
2 changed files with 5 additions and 4 deletions

View File

@ -8,6 +8,7 @@ type DialogProps = {
children: ReactNode children: ReactNode
show: boolean show: boolean
onClose?: () => void onClose?: () => void
inWorkflow?: boolean
} }
const DialogWrapper = ({ const DialogWrapper = ({
@ -15,6 +16,7 @@ const DialogWrapper = ({
children, children,
show, show,
onClose, onClose,
inWorkflow = true,
}: DialogProps) => { }: DialogProps) => {
const close = useCallback(() => onClose?.(), [onClose]) const close = useCallback(() => onClose?.(), [onClose])
return ( return (
@ -33,7 +35,7 @@ const DialogWrapper = ({
</Transition.Child> </Transition.Child>
<div className="fixed inset-0"> <div className="fixed inset-0">
<div className="flex flex-col items-end justify-center min-h-full pt-[112px] pb-2"> <div className={cn('flex flex-col items-end justify-center min-h-full pb-2', inWorkflow ? 'pt-[112px]' : 'pt-[56px]')}>
<Transition.Child <Transition.Child
as={Fragment} as={Fragment}
enter="ease-out duration-300" enter="ease-out duration-300"
@ -43,7 +45,7 @@ const DialogWrapper = ({
leaveFrom="opacity-100 scale-100" leaveFrom="opacity-100 scale-100"
leaveTo="opacity-0 scale-95" leaveTo="opacity-0 scale-95"
> >
<Dialog.Panel className={cn('grow relative w-[420px] h-[calc(100vh-120px)] p-0 overflow-hidden text-left align-middle transition-all transform border-t-[0.5px] border-l-[0.5px] border-b-[0.5px] border-components-panel-border shadow-xl rounded-l-2xl', className)}> <Dialog.Panel className={cn('grow flex relative w-[420px] h-0 p-0 overflow-hidden text-left align-middle transition-all transform bg-components-panel-bg-alt border-t-[0.5px] border-l-[0.5px] border-b-[0.5px] border-components-panel-border shadow-xl rounded-l-2xl', className)}>
{children} {children}
</Dialog.Panel> </Dialog.Panel>
</Transition.Child> </Transition.Child>

View File

@ -14,11 +14,10 @@ const NewFeaturePanel = ({ show, onClose }: Props) => {
return ( return (
<DialogWrapper <DialogWrapper
className='flex'
show={show} show={show}
onClose={onClose} onClose={onClose}
> >
<div className='grow flex flex-col h-full bg-components-panel-bg-alt'> <div className='grow flex flex-col h-full'>
<div className='shrink-0 flex justify-between p-4 pb-3'> <div className='shrink-0 flex justify-between p-4 pb-3'>
<div> <div>
<div className='text-text-primary system-xl-semibold'>{t('workflow.common.features')}</div> <div className='text-text-primary system-xl-semibold'>{t('workflow.common.features')}</div>