1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Gas inputs can be changed by up and down arrows (#3598)

* Up and down arrows can control gas inputs.

* input-number.js just uses number type.
This commit is contained in:
Dan J Miller 2018-03-20 20:20:30 -02:30 committed by Alexander Tseung
parent fd3e240dd9
commit a69480d78d
2 changed files with 3 additions and 0 deletions

View File

@ -91,6 +91,7 @@ CurrencyInput.prototype.render = function () {
placeholder,
readOnly,
inputRef,
type,
} = this.props
const { emptyState, focused } = this.state
@ -99,6 +100,7 @@ CurrencyInput.prototype.render = function () {
const valueToRender = this.getValueToRender()
return h('input', {
className,
type,
value: emptyState ? '' : valueToRender,
placeholder: focused ? '' : placeholder,
size: valueToRender.length * inputSizeMultiplier,

View File

@ -55,6 +55,7 @@ InputNumber.prototype.render = function () {
className: 'customize-gas-input',
value,
placeholder,
type: 'number',
onInputChange: newValue => {
this.setValue(newValue)
},