chore: update dialog height

This commit is contained in:
steven
2023-04-12 15:38:49 +08:00
parent c4de3b0d6f
commit ce7ed9e821

View File

@ -15,7 +15,7 @@ const Dialog = (props: Props) => {
<DialogUI.Root open={true}> <DialogUI.Root open={true}>
<DialogUI.Portal> <DialogUI.Portal>
<DialogUI.Overlay className="fixed inset-0 bg-black bg-opacity-60 z-[999]" /> <DialogUI.Overlay className="fixed inset-0 bg-black bg-opacity-60 z-[999]" />
<DialogUI.Content className="bg-white dark:bg-zinc-800 rounded-xl p-4 px-5 fixed top-[50%] left-[50%] max-h-[85vh] w-[90vw] max-w-[450px] translate-x-[-50%] translate-y-[-50%] z-[999]"> <DialogUI.Content className="flex flex-col bg-white dark:bg-zinc-800 rounded-xl p-4 px-5 fixed top-[50%] left-[50%] h-auto max-h-[85vh] w-[90vw] max-w-[450px] translate-x-[-50%] translate-y-[-50%] z-[999]">
<DialogUI.Title className="text-lg text-black dark:text-gray-300 font-medium mb-2">{title}</DialogUI.Title> <DialogUI.Title className="text-lg text-black dark:text-gray-300 font-medium mb-2">{title}</DialogUI.Title>
<DialogUI.Close <DialogUI.Close
className="absolute top-3 right-3 outline-none w-8 h-8 p-1 bg-zinc-600 rounded-full text-gray-300 hover:opacity-80" className="absolute top-3 right-3 outline-none w-8 h-8 p-1 bg-zinc-600 rounded-full text-gray-300 hover:opacity-80"
@ -24,7 +24,7 @@ const Dialog = (props: Props) => {
> >
<Icon.IoClose className="w-full h-auto" /> <Icon.IoClose className="w-full h-auto" />
</DialogUI.Close> </DialogUI.Close>
<div className="w-full flex flex-col justify-start items-start">{children}</div> <div className="w-full h-[calc(100%-36px)] flex flex-col justify-start items-start overflow-y-auto">{children}</div>
</DialogUI.Content> </DialogUI.Content>
</DialogUI.Portal> </DialogUI.Portal>
</DialogUI.Root> </DialogUI.Root>