From ec7df134b48e08ea8930498b1acb9e8a97fa7556 Mon Sep 17 00:00:00 2001 From: Sophia Dao Date: Wed, 17 Jul 2024 12:43:33 -0500 Subject: [PATCH] feat(modal): make code review changes --- components/ui/modal/Modal.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/components/ui/modal/Modal.tsx b/components/ui/modal/Modal.tsx index d450c6e858..7c18d750a6 100644 --- a/components/ui/modal/Modal.tsx +++ b/components/ui/modal/Modal.tsx @@ -15,6 +15,7 @@ interface ModalProps { body: React.ReactNode; actionText?: string; onAction?: () => void; + isDismissable?: boolean; } export const Modal: React.FC = ({ @@ -24,12 +25,20 @@ export const Modal: React.FC = ({ body, actionText, onAction, + isDismissable = true, }) => { const hasActionButton = actionText && onAction; return ( <> - + {(onClose) => ( <>