From edaf2125edd8c2e1bc2d7d3ac6df1912cb665c23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Muzyk?= Date: Wed, 12 Mar 2025 12:47:15 +0100 Subject: [PATCH 1/4] feat: Padding in VBA flows --- .../SubStepForms/ConfirmationStep.tsx | 126 +++++++++--------- .../BeneficialOwnersList.tsx | 69 +++++----- .../NonUSD/Country/subSteps/Confirmation.tsx | 89 ++++++------- .../NonUSD/SignerInfo/HangTight.tsx | 59 ++++---- .../subSteps/CompanyOwnersListUBO.tsx | 101 +++++++------- 5 files changed, 211 insertions(+), 233 deletions(-) diff --git a/src/components/SubStepForms/ConfirmationStep.tsx b/src/components/SubStepForms/ConfirmationStep.tsx index 376a31872cff7..9b093409bbc18 100644 --- a/src/components/SubStepForms/ConfirmationStep.tsx +++ b/src/components/SubStepForms/ConfirmationStep.tsx @@ -3,12 +3,12 @@ import {View} from 'react-native'; import Button from '@components/Button'; import DotIndicatorMessage from '@components/DotIndicatorMessage'; import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; -import SafeAreaConsumer from '@components/SafeAreaConsumer'; import ScrollView from '@components/ScrollView'; import Text from '@components/Text'; import TextLink from '@components/TextLink'; import useLocalize from '@hooks/useLocalize'; import useNetwork from '@hooks/useNetwork'; +import useStyledSafeAreaInsets from '@hooks/useStyledSafeAreaInsets'; import type {SubStepProps} from '@hooks/useSubStep/types'; import useThemeStyles from '@hooks/useThemeStyles'; import CONST from '@src/CONST'; @@ -48,74 +48,72 @@ function ConfirmationStep({pageTitle, summaryItems, showOnfidoLinks, onfidoLinks const styles = useThemeStyles(); const {isOffline} = useNetwork(); - return ( - - {({safeAreaPaddingBottomStyle}) => ( - - {pageTitle} - {summaryItems.map(({description, title, shouldShowRightIcon, onPress}) => ( - - ))} + const {paddingBottom: safeAreaInsetPaddingBottom} = useStyledSafeAreaInsets(); - {showOnfidoLinks && ( - - {onfidoLinksTitle} - - {translate('onfidoStep.facialScan')} - - {', '} - - {translate('common.privacy')} - - {` ${translate('common.and')} `} - - {translate('common.termsOfService')} - - - )} + return ( + + {pageTitle} + {summaryItems.map(({description, title, shouldShowRightIcon, onPress}) => ( + + ))} - - {!!error && error.length > 0 && ( - - )} -