You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.1 KiB
47 lines
1.1 KiB
7 years ago
|
import React, { Component } from 'react'
|
||
|
import PropTypes from 'prop-types'
|
||
7 years ago
|
import AccountListItem from '../../../account-list-item/'
|
||
|
import SendDropdownList from '../../send-dropdown-list/'
|
||
7 years ago
|
|
||
|
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,
|
||
|
};
|
||
|
|
||
7 years ago
|
static contextTypes = {
|
||
|
t: PropTypes.func,
|
||
|
};
|
||
|
|
||
7 years ago
|
render () {
|
||
7 years ago
|
const {
|
||
|
accounts,
|
||
|
closeDropdown,
|
||
|
dropdownOpen,
|
||
7 years ago
|
openDropdown,
|
||
|
selectedAccount,
|
||
7 years ago
|
onSelect,
|
||
7 years ago
|
} = this.props
|
||
7 years ago
|
|
||
|
return <div className="send-v2__from-dropdown">
|
||
7 years ago
|
<AccountListItem
|
||
|
account={selectedAccount}
|
||
|
handleClick={openDropdown}
|
||
7 years ago
|
icon={<i className={`fa fa-caret-down fa-lg`} style={ { color: '#dedede' } }/>}
|
||
7 years ago
|
/>
|
||
7 years ago
|
{dropdownOpen && <SendDropdownList
|
||
|
accounts={accounts}
|
||
|
closeDropdown={closeDropdown}
|
||
|
onSelect={onSelect}
|
||
|
activeAddress={selectedAccount.address}
|
||
7 years ago
|
/>}
|
||
7 years ago
|
</div>
|
||
|
}
|
||
|
|
||
|
}
|