aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/input-number.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2017-11-16 02:30:35 +0800
committerDan <danjm.com@gmail.com>2017-11-16 02:30:35 +0800
commitbbdb35c35a03c42eb4a950756bf280e6e15513b5 (patch)
treeb313f2bdd5b0cdf4be03228954d2647ff89a8d37 /ui/app/components/input-number.js
parent59e46e7cb25b7355bd969fe9ab04090f52ec67bc (diff)
downloadtangerine-wallet-browser-bbdb35c35a03c42eb4a950756bf280e6e15513b5.tar
tangerine-wallet-browser-bbdb35c35a03c42eb4a950756bf280e6e15513b5.tar.gz
tangerine-wallet-browser-bbdb35c35a03c42eb4a950756bf280e6e15513b5.tar.bz2
tangerine-wallet-browser-bbdb35c35a03c42eb4a950756bf280e6e15513b5.tar.lz
tangerine-wallet-browser-bbdb35c35a03c42eb4a950756bf280e6e15513b5.tar.xz
tangerine-wallet-browser-bbdb35c35a03c42eb4a950756bf280e6e15513b5.tar.zst
tangerine-wallet-browser-bbdb35c35a03c42eb4a950756bf280e6e15513b5.zip
Use currency input component in input number, to improve input behaviour in gas estimator
Diffstat (limited to 'ui/app/components/input-number.js')
-rw-r--r--ui/app/components/input-number.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/ui/app/components/input-number.js b/ui/app/components/input-number.js
index 12dec2957..fd8c5c309 100644
--- a/ui/app/components/input-number.js
+++ b/ui/app/components/input-number.js
@@ -1,6 +1,7 @@
const Component = require('react').Component
const h = require('react-hyperscript')
const inherits = require('util').inherits
+const CurrencyInput = require('./currency-input')
const {
addCurrencies,
conversionGTE,
@@ -50,11 +51,13 @@ InputNumber.prototype.render = function () {
const { unitLabel, step = 1, placeholder, value = 0 } = this.props
return h('div.customize-gas-input-wrapper', {}, [
- h('input.customize-gas-input', {
- placeholder,
+ h(CurrencyInput, {
+ className: 'customize-gas-input',
value,
- step,
- onChange: (e) => this.setValue(e.target.value),
+ placeholder,
+ onInputChange: newValue => {
+ this.setValue(newValue)
+ },
}),
h('span.gas-tooltip-input-detail', {}, [unitLabel]),
h('div.gas-tooltip-input-arrows', {}, [