Skip to content

Commit

Permalink
Merge pull request #28595 from aman-atg/aman/use-correct-marginTop-value
Browse files Browse the repository at this point in the history
define and use `canUseTouchScreen` to get apply correct value for marginTop in Button
  • Loading branch information
Gonals authored Oct 3, 2023
2 parents 0aafbf5 + 34e6066 commit be98ca2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pages/iou/steps/MoneyRequestAmountForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ function MoneyRequestAmountForm({amount, currency, isEditing, forwardedRef, onCu

const formattedAmount = MoneyRequestUtils.replaceAllDigits(currentAmount, toLocaleDigit);
const buttonText = isEditing ? translate('common.save') : translate('common.next');
const canUseTouchScreen = DeviceCapabilities.canUseTouchScreen();

return (
<ScrollView contentContainerStyle={styles.flexGrow1}>
Expand Down Expand Up @@ -273,7 +274,7 @@ function MoneyRequestAmountForm({amount, currency, isEditing, forwardedRef, onCu
style={[styles.w100, styles.justifyContentEnd, styles.pageWrapper, styles.pt0]}
nativeID={NUM_PAD_CONTAINER_VIEW_ID}
>
{DeviceCapabilities.canUseTouchScreen() ? (
{canUseTouchScreen ? (
<BigNumberPad
nativeID={NUM_PAD_VIEW_ID}
numberPressed={updateAmountNumberPad}
Expand All @@ -285,7 +286,7 @@ function MoneyRequestAmountForm({amount, currency, isEditing, forwardedRef, onCu
allowBubble
pressOnEnter
medium={isExtraSmallScreenHeight}
style={[styles.w100, styles.mt5]}
style={[styles.w100, canUseTouchScreen ? styles.mt5 : styles.mt2]}
onPress={submitAndNavigateToNextPage}
text={buttonText}
/>
Expand Down

0 comments on commit be98ca2

Please sign in to comment.