feat(ui fix)

This commit is contained in:
2025-10-01 00:09:14 +05:30
parent 31ed528d84
commit 82e3651ba4

View File

@@ -471,15 +471,27 @@ export function ClaimForm({
await handleMHSubmit(nextForm); await handleMHSubmit(nextForm);
}; };
// overlay click handler (close when clicking backdrop)
const onOverlayMouseDown = (e: React.MouseEvent<HTMLDivElement>) => {
// only close if clicked the backdrop itself (not inner modal)
if (e.target === e.currentTarget) {
onClose();
}
};
return ( return (
<div className="fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4 overflow-y-auto"> <div
<Card className="w-full max-w-5xl max-h-[90vh] overflow-y-auto bg-white"> className="fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4 overflow-y-auto"
<CardHeader className="flex flex-row items-center justify-between pb-2 border-b"> onMouseDown={onOverlayMouseDown}
>
<Card className="w-[90vw] h-[90vh] max-w-none overflow-auto bg-white relative">
<CardHeader className="sticky top-0 z-20 flex flex-row items-center justify-between pb-2 border-b bg-white/95 backdrop-blur-sm">
<CardTitle className="text-xl font-bold"> <CardTitle className="text-xl font-bold">
Insurance Claim Form Insurance Claim Form
</CardTitle> </CardTitle>
<Button variant="ghost" size="icon" onClick={onClose}> <Button onClick={onClose}>
<X className="h-4 w-4" /> {" "}
<X className="w-4 h-4" />
</Button> </Button>
</CardHeader> </CardHeader>
<CardContent className="pt-4"> <CardContent className="pt-4">