diff options
author | Dan <danjm.com@gmail.com> | 2017-08-29 21:55:11 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-08-31 07:46:24 +0800 |
commit | 1485ec7392a03a9b3a63262e0ecf0d90f0713251 (patch) | |
tree | b5c5c14f88b87abdab09882c8eb556f8d95e2527 /ui/app/send.js | |
parent | 3ce69e1b65dc4e12c51400d01b973cb0d0c79e7a (diff) | |
download | tangerine-wallet-browser-1485ec7392a03a9b3a63262e0ecf0d90f0713251.tar tangerine-wallet-browser-1485ec7392a03a9b3a63262e0ecf0d90f0713251.tar.gz tangerine-wallet-browser-1485ec7392a03a9b3a63262e0ecf0d90f0713251.tar.bz2 tangerine-wallet-browser-1485ec7392a03a9b3a63262e0ecf0d90f0713251.tar.lz tangerine-wallet-browser-1485ec7392a03a9b3a63262e0ecf0d90f0713251.tar.xz tangerine-wallet-browser-1485ec7392a03a9b3a63262e0ecf0d90f0713251.tar.zst tangerine-wallet-browser-1485ec7392a03a9b3a63262e0ecf0d90f0713251.zip |
Move currency toggle to its own component.
Diffstat (limited to 'ui/app/send.js')
-rw-r--r-- | ui/app/send.js | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/ui/app/send.js b/ui/app/send.js index b099c0251..b3a137adb 100644 --- a/ui/app/send.js +++ b/ui/app/send.js @@ -7,7 +7,8 @@ const hexToBn = require('../../app/scripts/lib/hex-to-bn') const EthBalance = require('./components/eth-balance') const EnsInput = require('./components/ens-input') const FiatValue = require('./components/fiat-value') -const GasTooltip = require('./components/gas-tooltip') +const GasTooltip = require('./components/send/gas-tooltip') +const CurrencyToggle = require('./components/send/currency-toggle') const { getSelectedIdentity } = require('./selectors') const { @@ -210,17 +211,10 @@ SendTransactionScreen.prototype.render = function () { h('div.send-screen-amount-labels', {}, [ h('span', {}, ['Amount']), - h('span', {}, [ - h('span', { - className: currentCurrency === 'ETH' ? 'selected-currency' : 'unselected-currency', - onClick: () => this.setCurrentCurrency('ETH') - }, ['ETH']), - '<>', - h('span', { - className: currentCurrency === 'USD' ? 'selected-currency' : 'unselected-currency', - onClick: () => this.setCurrentCurrency('USD'), - }, ['USD']), - ]), //holding on icon from design + h(CurrencyToggle, { + currentCurrency, + onClick: (newCurrency) => this.setCurrentCurrency(newCurrency) + }), //holding on icon from design ]), h('input.large-input.send-screen-input', { |