-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix: Big number pad button size is not justified on small screens #25656
Changes from 4 commits
a4e7b4f
bf24973
03a7079
b50d567
5e60f94
93604aa
50d1ed9
9db29de
5c7d439
bd3d3b8
6c54020
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import React, {useEffect, useState, useCallback, useRef} from 'react'; | ||
import {View} from 'react-native'; | ||
import {Dimensions, View} from 'react-native'; | ||
import PropTypes from 'prop-types'; | ||
import lodashGet from 'lodash/get'; | ||
import _ from 'underscore'; | ||
|
@@ -59,6 +59,7 @@ const NUM_PAD_VIEW_ID = 'numPadView'; | |
|
||
function MoneyRequestAmountForm({amount, currency, isEditing, forwardedRef, onCurrencyButtonPress, onSubmitButtonPress}) { | ||
const {translate, toLocaleDigit, numberFormat} = useLocalize(); | ||
const screenHeight = Dimensions.get('window').height; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's use If not, let move the condition to a const and name it as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes, we can. I've updated. |
||
|
||
const textInput = useRef(null); | ||
|
||
|
@@ -219,6 +220,7 @@ function MoneyRequestAmountForm({amount, currency, isEditing, forwardedRef, onCu | |
) : null} | ||
<Button | ||
success | ||
medium={screenHeight < 550} | ||
style={[styles.w100, styles.mt5]} | ||
onPress={submitAndNavigateToNextPage} | ||
pressOnEnter | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to do the same here and use
isExtraSmallScreenWidth