diff options
author | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-07-17 00:05:05 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-17 00:05:05 +0800 |
commit | db4469794e3e843f3cb08222d0a9b568c7816a85 (patch) | |
tree | 58602319cc267170b1038102817528df668e516f /ui/app/components/send/send-content/send-from-row/from-dropdown/from-dropdown.component.js | |
parent | 117d43be1f9aa701a8a02570ebbc71ecf1b9da94 (diff) | |
parent | 5c3efe8bc47a9f8e7a7e0952589c1a2f42ec4eca (diff) | |
download | tangerine-wallet-browser-db4469794e3e843f3cb08222d0a9b568c7816a85.tar.gz tangerine-wallet-browser-db4469794e3e843f3cb08222d0a9b568c7816a85.tar.zst tangerine-wallet-browser-db4469794e3e843f3cb08222d0a9b568c7816a85.zip |
Merge pull request #4621 from MetaMask/one-send-directory
Remove 'send_/' directory; revert to just having send
Diffstat (limited to 'ui/app/components/send/send-content/send-from-row/from-dropdown/from-dropdown.component.js')
-rw-r--r-- | ui/app/components/send/send-content/send-from-row/from-dropdown/from-dropdown.component.js | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/ui/app/components/send/send-content/send-from-row/from-dropdown/from-dropdown.component.js b/ui/app/components/send/send-content/send-from-row/from-dropdown/from-dropdown.component.js new file mode 100644 index 000000000..4f43a9d61 --- /dev/null +++ b/ui/app/components/send/send-content/send-from-row/from-dropdown/from-dropdown.component.js @@ -0,0 +1,46 @@ +import React, { Component } from 'react' +import PropTypes from 'prop-types' +import AccountListItem from '../../../account-list-item/' +import SendDropdownList from '../../send-dropdown-list/' + +export default class FromDropdown extends Component { + + static propTypes = { + accounts: PropTypes.array, + closeDropdown: PropTypes.func, + dropdownOpen: PropTypes.bool, + onSelect: PropTypes.func, + openDropdown: PropTypes.func, + selectedAccount: PropTypes.object, + }; + + static contextTypes = { + t: PropTypes.func, + }; + + render () { + const { + accounts, + closeDropdown, + dropdownOpen, + openDropdown, + selectedAccount, + onSelect, + } = this.props + + return <div className="send-v2__from-dropdown"> + <AccountListItem + account={selectedAccount} + handleClick={openDropdown} + icon={<i className={`fa fa-caret-down fa-lg`} style={ { color: '#dedede' } }/>} + /> + {dropdownOpen && <SendDropdownList + accounts={accounts} + closeDropdown={closeDropdown} + onSelect={onSelect} + activeAddress={selectedAccount.address} + />} + </div> + } + +} |