Browse Source

fix(amount-input-width): Size the PayForm amount input to hold at least 2 chars

Because the "." of "0." is not propagated via the JS, so not in the size of
the amount string.
renovate/lint-staged-8.x
Ben Woosley 7 years ago
parent
commit
3b5e118a23
No known key found for this signature in database GPG Key ID: 6EE5F3785F78B345
  1. 2
      app/components/Form/PayForm.js

2
app/components/Form/PayForm.js

@ -66,7 +66,7 @@ class PayForm extends Component {
isLn ? isLn ?
{ width: '75%', fontSize: '85px' } { width: '75%', fontSize: '85px' }
: :
{ width: `${amount.length > 1 ? (amount.length * 20) - 5 : 25}%`, fontSize: `${190 - (amount.length ** 2)}px` } { width: `${amount.length > 1 ? (amount.length * 20) - 5 : 35}%`, fontSize: `${190 - (amount.length ** 2)}px` }
} }
value={currentAmount} value={currentAmount}
onChange={event => setPayAmount(event.target.value)} onChange={event => setPayAmount(event.target.value)}

Loading…
Cancel
Save