feat: feature support UI preview (#269)

This commit is contained in:
Joel 2023-05-31 14:10:59 +08:00 • committed by GitHub
commit 554570dc22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 551 additions and 15 deletions

View file

@ -12,6 +12,7 @@ type IModal = {
description?: React.ReactNode
children: React.ReactNode
closable?: boolean
overflowVisible?: boolean
}
export default function Modal({
@ -23,6 +24,7 @@ export default function Modal({
description,
children,
closable = false,
overflowVisible = false,
}: IModal) {
return (
<Transition appear show={isShow} as={Fragment}>
@ -50,7 +52,7 @@ export default function Modal({
leaveFrom="opacity-100 scale-100"
leaveTo="opacity-0 scale-95"
>
<Dialog.Panel className={`w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all ${className}`}>
<Dialog.Panel className={`w-full max-w-md transform ${overflowVisible ? 'overflow-visible' : 'overflow-hidden'} rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all ${className}`}>
{title && <Dialog.Title
as="h3"
className="text-lg font-medium leading-6 text-gray-900"