feat(ux): prevent wizard close on backdrop click
AnimatedModal: add disableBackdropClose prop (default false, no impact on existing consumers). When true, overlay onClick is removed. ProjectWizard: remove handleBackdropClick — backdrop click no longer closes the wizard. Only the X button and Cancel close it. EstimateWizard already had no backdrop-click handler; no change needed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ interface AnimatedModalProps {
|
||||
className?: string;
|
||||
overlayClassName?: string;
|
||||
maxWidth?: string;
|
||||
disableBackdropClose?: boolean;
|
||||
}
|
||||
|
||||
export function AnimatedModal({
|
||||
@@ -19,6 +20,7 @@ export function AnimatedModal({
|
||||
className,
|
||||
overlayClassName,
|
||||
maxWidth = "max-w-xl",
|
||||
disableBackdropClose = false,
|
||||
}: AnimatedModalProps) {
|
||||
const panelRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
@@ -49,7 +51,7 @@ export function AnimatedModal({
|
||||
overlayClassName ??
|
||||
"absolute inset-0 bg-black/40 backdrop-blur-sm"
|
||||
}
|
||||
onClick={onClose}
|
||||
onClick={disableBackdropClose ? undefined : onClose}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user