From 1c80e61329d34ac0b5112390e229d7fde5a8b88c Mon Sep 17 00:00:00 2001 From: T'JAMPENS QUENTIN p2406187 Date: Tue, 9 Dec 2025 11:20:00 +0100 Subject: [PATCH] Close modal on click --- src/components/ui/modal/modal.jsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/ui/modal/modal.jsx b/src/components/ui/modal/modal.jsx index 6ddf2a8..822398c 100644 --- a/src/components/ui/modal/modal.jsx +++ b/src/components/ui/modal/modal.jsx @@ -6,9 +6,17 @@ const Modal = ({ open, onClose, children, title }) => { if (!open) return null; + const handleOverlayClick = () => { + onClose(); + }; + + const handleModalClick = (e) => { + e.stopPropagation(); + }; + return createPortal( -
-
+
+
{title &&

{title}

} {children}