Skip to content

Commit

Permalink
Merge pull request #40727 from Krishna2323/krishna2323/issue/40721
Browse files Browse the repository at this point in the history
fix: Quick action - 'Pay elsewhere' button is small when paying someone via Quick action
  • Loading branch information
Gonals authored Apr 24, 2024
2 parents 915a1b6 + 83acd68 commit c9cf767
Showing 1 changed file with 37 additions and 35 deletions.
72 changes: 37 additions & 35 deletions src/pages/iou/steps/MoneyRequestAmountForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -310,41 +310,43 @@ function MoneyRequestAmountForm(
longPressHandlerStateChanged={updateLongPressHandlerState}
/>
) : null}
{iouType === CONST.IOU.TYPE.PAY && skipConfirmation ? (
<SettlementButton
pressOnEnter
onPress={submitAndNavigateToNextPage}
enablePaymentsRoute={ROUTES.IOU_SEND_ENABLE_PAYMENTS}
addBankAccountRoute={bankAccountRoute}
addDebitCardRoute={ROUTES.IOU_SEND_ADD_DEBIT_CARD}
currency={currency ?? CONST.CURRENCY.USD}
policyID={policyID ?? ''}
style={[styles.w100, canUseTouchScreen ? styles.mt5 : styles.mt3]}
buttonSize={CONST.DROPDOWN_BUTTON_SIZE.LARGE}
kycWallAnchorAlignment={{
horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.LEFT,
vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.BOTTOM,
}}
paymentMethodDropdownAnchorAlignment={{
horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.RIGHT,
vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.BOTTOM,
}}
shouldShowPersonalBankAccountOption
enterKeyEventListenerPriority={1}
/>
) : (
<Button
success
// Prevent bubbling on edit amount Page to prevent double page submission when two CTA are stacked.
allowBubble={!isEditing}
pressOnEnter
medium={isExtraSmallScreenHeight}
large={!isExtraSmallScreenHeight}
style={[styles.w100, canUseTouchScreen ? styles.mt5 : styles.mt3]}
onPress={() => submitAndNavigateToNextPage()}
text={buttonText}
/>
)}
<View style={styles.w100}>
{iouType === CONST.IOU.TYPE.PAY && skipConfirmation ? (
<SettlementButton
pressOnEnter
onPress={submitAndNavigateToNextPage}
enablePaymentsRoute={ROUTES.IOU_SEND_ENABLE_PAYMENTS}
addBankAccountRoute={bankAccountRoute}
addDebitCardRoute={ROUTES.IOU_SEND_ADD_DEBIT_CARD}
currency={currency ?? CONST.CURRENCY.USD}
policyID={policyID ?? ''}
style={[styles.w100, canUseTouchScreen ? styles.mt5 : styles.mt3]}
buttonSize={CONST.DROPDOWN_BUTTON_SIZE.LARGE}
kycWallAnchorAlignment={{
horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.LEFT,
vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.BOTTOM,
}}
paymentMethodDropdownAnchorAlignment={{
horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.RIGHT,
vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.BOTTOM,
}}
shouldShowPersonalBankAccountOption
enterKeyEventListenerPriority={1}
/>
) : (
<Button
success
// Prevent bubbling on edit amount Page to prevent double page submission when two CTA are stacked.
allowBubble={!isEditing}
pressOnEnter
medium={isExtraSmallScreenHeight}
large={!isExtraSmallScreenHeight}
style={[styles.w100, canUseTouchScreen ? styles.mt5 : styles.mt3]}
onPress={() => submitAndNavigateToNextPage()}
text={buttonText}
/>
)}
</View>
</View>
</ScrollView>
);
Expand Down

0 comments on commit c9cf767

Please sign in to comment.