diff options
author | Dan <danjm.com@gmail.com> | 2017-10-24 08:32:30 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-10-24 13:41:30 +0800 |
commit | e058efd6a890598164baa9b337f710fc66ca22c5 (patch) | |
tree | 6804fc3656db4537c1fa9761be4e141e78f67490 /ui/app | |
parent | e737a9565a6b78639b74511d026339c1b54bca1a (diff) | |
download | tangerine-wallet-browser-e058efd6a890598164baa9b337f710fc66ca22c5.tar tangerine-wallet-browser-e058efd6a890598164baa9b337f710fc66ca22c5.tar.gz tangerine-wallet-browser-e058efd6a890598164baa9b337f710fc66ca22c5.tar.bz2 tangerine-wallet-browser-e058efd6a890598164baa9b337f710fc66ca22c5.tar.lz tangerine-wallet-browser-e058efd6a890598164baa9b337f710fc66ca22c5.tar.xz tangerine-wallet-browser-e058efd6a890598164baa9b337f710fc66ca22c5.tar.zst tangerine-wallet-browser-e058efd6a890598164baa9b337f710fc66ca22c5.zip |
Use classnames library and disabled attribute on 'Next' button in send-v2
Diffstat (limited to 'ui/app')
-rw-r--r-- | ui/app/send-v2.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/ui/app/send-v2.js b/ui/app/send-v2.js index 16e4d7801..0086faa1f 100644 --- a/ui/app/send-v2.js +++ b/ui/app/send-v2.js @@ -2,6 +2,7 @@ const { inherits } = require('util') const PersistentForm = require('../lib/persistent-form') const h = require('react-hyperscript') const connect = require('react-redux').connect +const classnames = require('classnames') const Identicon = require('./components/identicon') const FromDropdown = require('./components/send/from-dropdown') @@ -380,7 +381,6 @@ SendTransactionScreen.prototype.renderFooter = function () { } = this.props const noErrors = amountError === null && toError === null - const errorClass = noErrors ? '' : '__disabled' return h('div.send-v2__footer', [ h('button.send-v2__cancel-btn', { @@ -389,8 +389,13 @@ SendTransactionScreen.prototype.renderFooter = function () { goHome() }, }, 'Cancel'), - h(`button.send-v2__next-btn${errorClass}`, { - onClick: event => noErrors && this.onSubmit(event), + h(`button`, { + className: classnames({ + 'send-v2__next-btn': noErrors, + 'send-v2__next-btn__disabled': !noErrors, + }), + disabled: !noErrors, + onClick: event => this.onSubmit(event), }, 'Next'), ]) } |