Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

define and use canUseTouchScreen to get apply correct value for marginTop in Button #28595

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/pages/iou/steps/MoneyRequestAmountForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,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 @@ -257,7 +258,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 @@ -267,7 +268,7 @@ function MoneyRequestAmountForm({amount, currency, isEditing, forwardedRef, onCu
<Button
success
medium={isExtraSmallScreenHeight}
style={[styles.w100, styles.mt5]}
style={[styles.w100, canUseTouchScreen ? styles.mt5 : styles.mt2]}
onPress={submitAndNavigateToNextPage}
pressOnEnter
text={buttonText}
Expand Down
Loading