diff --git a/src/components/ConfirmModal.tsx b/src/components/ConfirmModal.tsx index 487d637b2ea2..960e49e19bce 100755 --- a/src/components/ConfirmModal.tsx +++ b/src/components/ConfirmModal.tsx @@ -19,6 +19,9 @@ type ConfirmModalProps = { /** A callback to call when the form has been closed */ onCancel?: () => void; + /** A callback to call when backdrop is pressed */ + onBackdropPress?: () => void; + /** Modal visibility */ isVisible: boolean; @@ -108,6 +111,7 @@ function ConfirmModal({ success = true, danger = false, onCancel = () => {}, + onBackdropPress = () => {}, shouldDisableConfirmButtonWhenOffline = false, shouldShowCancelButton = true, shouldSetModalVisibility = true, @@ -139,6 +143,7 @@ function ConfirmModal({ { + setShowModal(false); + resetPermissionFlow(); + }} confirmText={getConfirmText()} cancelText={translate('common.notNow')} prompt={translate(hasError ? 'receipt.locationErrorMessage' : 'receipt.locationAccessMessage')}