feat: feature support UI preview (#269)

This commit is contained in:
Joel
2023-05-31 14:10:59 +08:00
committed by GitHub
parent 5239b2c7ab
commit 554570dc22
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"