From 7c5dca1665951f10ec5624ac853832b6421bd27f Mon Sep 17 00:00:00 2001 From: "pramod.mahajan" Date: Fri, 24 Oct 2025 11:36:00 +0530 Subject: [PATCH] updated confirm modal, added success option --- src/components/common/ConfirmModal.jsx | 32 ++++++++++++++------------ 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/components/common/ConfirmModal.jsx b/src/components/common/ConfirmModal.jsx index 037c6a59..dd0158eb 100644 --- a/src/components/common/ConfirmModal.jsx +++ b/src/components/common/ConfirmModal.jsx @@ -13,19 +13,18 @@ const ConfirmModal = ({ if (!isOpen) return null; const TypeofIcon = () => { - if (type === "delete") { - return ( - - ); + switch (type) { + case "delete": + return ; + case "success": + return ; + case "warning": + return ; + default: + return null; } - return null; }; - const modalSize = type === "delete" ? "sm" : "md"; - return (
-
+
{header && {header}}
-
{TypeofIcon()}
-
+
+ {TypeofIcon()} +
+
{message}
+