From a3b28843b6d3e0f89af01ec03c17d8167119c617 Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Sat, 1 Mar 2025 20:12:40 +0530 Subject: [PATCH] (feat:confirm-modal) danger variant --- frontend/src/modals/ConfirmationModal.tsx | 10 +++++++++- frontend/src/modals/DeleteConvModal.tsx | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/src/modals/ConfirmationModal.tsx b/frontend/src/modals/ConfirmationModal.tsx index 28b9c582..154fcac7 100644 --- a/frontend/src/modals/ConfirmationModal.tsx +++ b/frontend/src/modals/ConfirmationModal.tsx @@ -11,6 +11,7 @@ export default function ConfirmationModal({ handleSubmit, cancelLabel, handleCancel, + variant = 'default', }: { message: string; modalState: ActiveState; @@ -19,8 +20,15 @@ export default function ConfirmationModal({ handleSubmit: () => void; cancelLabel?: string; handleCancel?: () => void; + variant?: 'default' | 'danger'; }) { const { t } = useTranslation(); + + const submitButtonClasses = + variant === 'danger' + ? 'rounded-3xl bg-rosso-corsa px-5 py-2 text-sm text-lotion transition-all hover:bg-red-2000' + : 'rounded-3xl bg-purple-30 px-5 py-2 text-sm text-lotion transition-all hover:bg-[#6F3FD1]'; + return ( <> {modalState === 'ACTIVE' && ( @@ -39,7 +47,7 @@ export default function ConfirmationModal({
diff --git a/frontend/src/modals/DeleteConvModal.tsx b/frontend/src/modals/DeleteConvModal.tsx index 43ec2a65..630300ad 100644 --- a/frontend/src/modals/DeleteConvModal.tsx +++ b/frontend/src/modals/DeleteConvModal.tsx @@ -42,6 +42,7 @@ export default function DeleteConvModal({ submitLabel={t('modals.deleteConv.delete')} handleSubmit={handleSubmit} handleCancel={handleCancel} + variant="danger" /> ); }