mirror of
https://github.com/fluxscape/fluxscape.git
synced 2026-01-11 14:52:54 +01:00
feat(editor): Deploy popup always mounted (#51)
This removes the delayed loading when opening the deploy popup
This commit is contained in:
@@ -9,6 +9,11 @@
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
|
||||
&.is-hidden {
|
||||
visibility: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
&.has-backdrop {
|
||||
background-color: var(--theme-color-bg-1-transparent);
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ export interface BaseDialogProps extends UnsafeStyleProps {
|
||||
isVisible?: boolean;
|
||||
hasBackdrop?: boolean;
|
||||
hasArrow?: boolean;
|
||||
alwaysMounted?: boolean;
|
||||
|
||||
children?: Slot;
|
||||
|
||||
@@ -69,6 +70,7 @@ export function CoreBaseDialog({
|
||||
isVisible,
|
||||
hasBackdrop,
|
||||
hasArrow,
|
||||
alwaysMounted,
|
||||
|
||||
children,
|
||||
|
||||
@@ -261,7 +263,7 @@ export function CoreBaseDialog({
|
||||
}
|
||||
}, [background]);
|
||||
|
||||
if (!isVisible) return null;
|
||||
if (!isVisible && !alwaysMounted) return null;
|
||||
|
||||
return (
|
||||
<div
|
||||
@@ -270,6 +272,7 @@ export function CoreBaseDialog({
|
||||
hasBackdrop && css['has-backdrop'],
|
||||
isLockingScroll && css['is-locking-scroll'],
|
||||
typeof triggerRef === 'undefined' && css['is-centered'],
|
||||
!isVisible && css['is-hidden'],
|
||||
css[variant]
|
||||
)}
|
||||
onClick={onClose}
|
||||
|
||||
@@ -55,6 +55,7 @@ export function DeployPopup(props: DeployPopupProps) {
|
||||
onClose={props.onClose}
|
||||
hasArrow
|
||||
isLockingScroll
|
||||
alwaysMounted
|
||||
>
|
||||
<DeployPopupChild />
|
||||
</BaseDialog>
|
||||
|
||||
Reference in New Issue
Block a user