Skip to content

Commit

Permalink
Merge pull request #54164 from Krishna2323/krishna2323/issue/53583
Browse files Browse the repository at this point in the history
fix: Inconsistency on bottom padding for submit button in issue expensify card flow.
  • Loading branch information
mountiny authored Dec 18, 2024
2 parents 53c0bd7 + a273938 commit f649baf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/components/SubStepForms/ConfirmationStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ type ConfirmationStepProps = SubStepProps & {

/** The error message to display */
error?: string;

/** Whether to apply safe area padding bottom */
shouldApplySafeAreaPaddingBottom?: boolean;
};

function ConfirmationStep({pageTitle, summaryItems, showOnfidoLinks, onfidoLinksTitle, isLoading, error, onNext}: ConfirmationStepProps) {
function ConfirmationStep({pageTitle, summaryItems, showOnfidoLinks, onfidoLinksTitle, isLoading, error, onNext, shouldApplySafeAreaPaddingBottom = true}: ConfirmationStepProps) {
const {translate} = useLocalize();
const styles = useThemeStyles();
const {isOffline} = useNetwork();
Expand All @@ -50,7 +53,7 @@ function ConfirmationStep({pageTitle, summaryItems, showOnfidoLinks, onfidoLinks
{({safeAreaPaddingBottomStyle}) => (
<ScrollView
style={styles.pt0}
contentContainerStyle={[styles.flexGrow1, safeAreaPaddingBottomStyle]}
contentContainerStyle={[styles.flexGrow1, shouldApplySafeAreaPaddingBottom && safeAreaPaddingBottomStyle]}
>
<Text style={[styles.textHeadlineLineHeightXXL, styles.ph5, styles.mb3]}>{pageTitle}</Text>
{summaryItems.map(({description, title, shouldShowRightIcon, onPress}) => (
Expand Down
2 changes: 1 addition & 1 deletion src/components/ValidateCodeActionModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function ValidateCodeActionModal({
onBackButtonPress={hide}
/>

<View style={[themeStyles.ph5, themeStyles.mt3, themeStyles.mb7, themeStyles.flex1]}>
<View style={[themeStyles.ph5, themeStyles.mt3, themeStyles.mb5, themeStyles.flex1]}>
<Text style={[themeStyles.mb3]}>{descriptionPrimary}</Text>
{!!descriptionSecondary && <Text style={[themeStyles.mb3]}>{descriptionSecondary}</Text>}
<ValidateCodeForm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ function Confirmation({onNext, onMove, isEditing}: SubStepProps) {
onfidoLinksTitle={`${translate('personalInfoStep.byAddingThisBankAccount')} `}
isLoading={isLoading}
error={error}
shouldApplySafeAreaPaddingBottom={false}
/>
);
}
Expand Down

0 comments on commit f649baf

Please sign in to comment.