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:
2026-04-07 16:09:22 +02:00
parent 4accee95a4
commit b103e79e92
2 changed files with 3 additions and 6 deletions
@@ -1478,14 +1478,9 @@ export function ProjectWizard({ open, onClose, onSuccess }: ProjectWizardProps)
if (!open) return null;
function handleBackdropClick(e: React.MouseEvent<HTMLDivElement>) {
if (e.target === e.currentTarget) handleClose();
}
return (
<div
className="fixed inset-0 bg-black/50 z-50 flex items-start justify-center overflow-y-auto py-8 px-4"
onClick={handleBackdropClick}
>
<div className="bg-white rounded-xl shadow-2xl w-full max-w-2xl relative">
{/* Celebration effects */}