From e801c173cd2475da439e57e5f13917ea793f672a Mon Sep 17 00:00:00 2001 From: GabrielTrettel Date: Fri, 15 Oct 2021 16:26:37 -0300 Subject: [PATCH] Confirmation modal now displays buttons only if onConfirm/onDecline functions are passed --- src/app/components/ConfirmationModal.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app/components/ConfirmationModal.js b/src/app/components/ConfirmationModal.js index f1127e5..ecec83f 100644 --- a/src/app/components/ConfirmationModal.js +++ b/src/app/components/ConfirmationModal.js @@ -22,12 +22,12 @@ function Btn({ label, onPress, bgColor, txtColor }) { export default function ConfirmationModal({ show, + onConfirm, + onDecline, + confirmationLabel, + declineLabel, title = "", description = "", - confirmationLabel = "", - declineLabel = "", - onConfirm = () => {}, - onDecline = () => {}, }) { return ( - - } + {onDecline && declineLabel && + />}