diff options
author | Daniel Tsui <szehungdanieltsui@gmail.com> | 2017-11-16 03:30:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-16 03:30:34 +0800 |
commit | f8d38f44c2612f0f291063814ec0e98bb4aaf4bb (patch) | |
tree | c1abd1bff24ffe07322fc378d8e4c5f3602032f5 /ui/app/components/input-number.js | |
parent | 59e46e7cb25b7355bd969fe9ab04090f52ec67bc (diff) | |
parent | 960cc8abcbdc82ae2b73a82f0faf1658f113a9d3 (diff) | |
download | tangerine-wallet-browser-f8d38f44c2612f0f291063814ec0e98bb4aaf4bb.tar.gz tangerine-wallet-browser-f8d38f44c2612f0f291063814ec0e98bb4aaf4bb.tar.zst tangerine-wallet-browser-f8d38f44c2612f0f291063814ec0e98bb4aaf4bb.zip |
Merge pull request #2587 from danjm/MM-281-currencyinput-in-gas-estimator
[NewUI] Use currency input component in gas customizer
Diffstat (limited to 'ui/app/components/input-number.js')
-rw-r--r-- | ui/app/components/input-number.js | 11 |
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', {}, [ |