feat: implement workflow onboarding modal system (#24551)

This commit is contained in:
lyzno1
2025-08-27 13:31:22 +08:00
committed by GitHub
parent 2984dbc0df
commit 7129de98cd
15 changed files with 998 additions and 9 deletions

View File

@ -16,6 +16,8 @@ type IModal = {
closable?: boolean
overflowVisible?: boolean
highPriority?: boolean // For modals that need to appear above dropdowns
overlayOpacity?: boolean // For semi-transparent overlay instead of default
clickOutsideNotClose?: boolean // Prevent closing when clicking outside modal
}
export default function Modal({
@ -29,13 +31,16 @@ export default function Modal({
closable = false,
overflowVisible = false,
highPriority = false,
overlayOpacity = false,
clickOutsideNotClose = false,
}: IModal) {
return (
<Transition appear show={isShow} as={Fragment}>
<Dialog as="div" className={classNames('relative', highPriority ? 'z-[1100]' : 'z-[60]', wrapperClassName)} onClose={onClose}>
<Dialog as="div" className={classNames('relative', highPriority ? 'z-[1100]' : 'z-[60]', wrapperClassName)} onClose={clickOutsideNotClose ? noop : onClose}>
<TransitionChild>
<div className={classNames(
'fixed inset-0 bg-background-overlay',
'fixed inset-0',
overlayOpacity ? 'bg-workflow-canvas-canvas-overlay' : 'bg-background-overlay',
'duration-300 ease-in data-[closed]:opacity-0',
'data-[enter]:opacity-100',
'data-[leave]:opacity-0',