aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send_/send-content/send-from-row/from-dropdown/from-dropdown.component.js
diff options
context:
space:
mode:
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.js46
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..418766cd9
--- /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,
+ };
+
+ 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>
+ }
+
+}
+
+FromDropdown.contextTypes = {
+ t: PropTypes.func,
+}