diff options
author | Jenny Pollack <jennypollack3@gmail.com> | 2018-06-08 05:10:56 +0800 |
---|---|---|
committer | Jenny Pollack <jennypollack3@gmail.com> | 2018-06-08 05:10:56 +0800 |
commit | e7c2710a55a49b8a266fa61cfed1caecc2623de7 (patch) | |
tree | c8553c02b63b10626ef561ca0bfe26c560b295d6 /ui/app/components/send/from-dropdown.js | |
parent | fd8bcc9cb1b9f9c1cc5ef48eda4952182b23e499 (diff) | |
parent | c0d2dab28b4083ee3ef65b6b561e28c811c6773d (diff) | |
download | tangerine-wallet-browser-e7c2710a55a49b8a266fa61cfed1caecc2623de7.tar tangerine-wallet-browser-e7c2710a55a49b8a266fa61cfed1caecc2623de7.tar.gz tangerine-wallet-browser-e7c2710a55a49b8a266fa61cfed1caecc2623de7.tar.bz2 tangerine-wallet-browser-e7c2710a55a49b8a266fa61cfed1caecc2623de7.tar.lz tangerine-wallet-browser-e7c2710a55a49b8a266fa61cfed1caecc2623de7.tar.xz tangerine-wallet-browser-e7c2710a55a49b8a266fa61cfed1caecc2623de7.tar.zst tangerine-wallet-browser-e7c2710a55a49b8a266fa61cfed1caecc2623de7.zip |
Merge branch 'develop' into save-brave
Diffstat (limited to 'ui/app/components/send/from-dropdown.js')
-rw-r--r-- | ui/app/components/send/from-dropdown.js | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/ui/app/components/send/from-dropdown.js b/ui/app/components/send/from-dropdown.js deleted file mode 100644 index 0686fbe73..000000000 --- a/ui/app/components/send/from-dropdown.js +++ /dev/null @@ -1,72 +0,0 @@ -const Component = require('react').Component -const h = require('react-hyperscript') -const inherits = require('util').inherits -const AccountListItem = require('./account-list-item') - -module.exports = FromDropdown - -inherits(FromDropdown, Component) -function FromDropdown () { - Component.call(this) -} - -FromDropdown.prototype.getListItemIcon = function (currentAccount, selectedAccount) { - const listItemIcon = h(`i.fa.fa-check.fa-lg`, { style: { color: '#02c9b1' } }) - - return currentAccount.address === selectedAccount.address - ? listItemIcon - : null -} - -FromDropdown.prototype.renderDropdown = function () { - const { - accounts, - selectedAccount, - closeDropdown, - onSelect, - } = this.props - - return h('div', {}, [ - - h('div.send-v2__from-dropdown__close-area', { - onClick: closeDropdown, - }), - - h('div.send-v2__from-dropdown__list', {}, [ - - ...accounts.map(account => h(AccountListItem, { - className: 'account-list-item__dropdown', - account, - handleClick: () => { - onSelect(account) - closeDropdown() - }, - icon: this.getListItemIcon(account, selectedAccount), - })), - - ]), - - ]) -} - -FromDropdown.prototype.render = function () { - const { - selectedAccount, - openDropdown, - dropdownOpen, - } = this.props - - return h('div.send-v2__from-dropdown', {}, [ - - h(AccountListItem, { - account: selectedAccount, - handleClick: openDropdown, - icon: h(`i.fa.fa-caret-down.fa-lg`, { style: { color: '#dedede' } }), - }), - - dropdownOpen && this.renderDropdown(), - - ]) - -} - |