From 489e8a31f39b68b77a5947031f9bc02393cad0fc Mon Sep 17 00:00:00 2001 From: rstubryan Date: Tue, 3 Feb 2026 11:46:45 +0700 Subject: [PATCH] refactor(FE): Make ConfirmationModal body scrollable and sticky --- src/components/modal/ConfirmationModal.tsx | 129 +++++++++++---------- 1 file changed, 70 insertions(+), 59 deletions(-) diff --git a/src/components/modal/ConfirmationModal.tsx b/src/components/modal/ConfirmationModal.tsx index 89b8fbd9..6c9255e0 100644 --- a/src/components/modal/ConfirmationModal.tsx +++ b/src/components/modal/ConfirmationModal.tsx @@ -122,10 +122,18 @@ const ConfirmationModal = ({ closeOnBackdrop={closeOnBackdrop} className={{ ...className, - modalBox: cn('rounded-xl p-4', className?.modalBox), + modalBox: cn( + 'rounded-xl p-4 flex flex-col gap-4 max-h-[90vh]', + className?.modalBox + ), }} > -
+
{iconPosition === 'center' ? ( <>
@@ -164,71 +172,74 @@ const ConfirmationModal = ({
)} +
- {children &&
{children}
} + {children && ( +
{children}
+ )} - {(secondaryButton || primaryButton) && ( -
- {secondaryButton && secondaryButton.text && ( - - )} + }} + className={cn( + 'p-2 rounded-xl text-sm', + secondaryButton?.className + )} + > + {secondaryButton?.text ?? 'Tidak'} + + )} - {primaryButton && primaryButton.text && ( - - )} -
- )} - + {primaryButton && primaryButton.text && ( + + )} + + )} ); };