diff options
author | Dan <danjm.com@gmail.com> | 2017-09-29 18:10:50 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-10-02 10:02:21 +0800 |
commit | 47ebcbb2ed09a4cd4b062c5fa4cb6d259369149f (patch) | |
tree | e465ea9a722bbaac505681787c3739e7792209e6 /ui/app/components/token-cell.js | |
parent | ff64fe98dde7746775396cbf94d63a1a0e91d069 (diff) | |
download | dexon-wallet-47ebcbb2ed09a4cd4b062c5fa4cb6d259369149f.tar.gz dexon-wallet-47ebcbb2ed09a4cd4b062c5fa4cb6d259369149f.tar.zst dexon-wallet-47ebcbb2ed09a4cd4b062c5fa4cb6d259369149f.zip |
Token menu ui.
Diffstat (limited to 'ui/app/components/token-cell.js')
-rw-r--r-- | ui/app/components/token-cell.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ui/app/components/token-cell.js b/ui/app/components/token-cell.js index e87d2c85..df73577e 100644 --- a/ui/app/components/token-cell.js +++ b/ui/app/components/token-cell.js @@ -8,6 +8,8 @@ const selectors = require('../selectors') const actions = require('../actions') const { conversionUtil } = require('../conversion-util') +const TokenMenuDropdown = require('./dropdowns/token-menu-dropdown.js') + function mapStateToProps (state) { return { network: state.metamask.network, @@ -32,6 +34,10 @@ module.exports = connect(mapStateToProps, mapDispatchToProps)(TokenCell) inherits(TokenCell, Component) function TokenCell () { Component.call(this) + + this.state = { + tokenMenuOpen: false, + } } TokenCell.prototype.componentWillMount = function () { @@ -44,6 +50,7 @@ TokenCell.prototype.componentWillMount = function () { } TokenCell.prototype.render = function () { + const { tokenMenuOpen } = this.state const props = this.props const { address, @@ -104,6 +111,17 @@ TokenCell.prototype.render = function () { }, formattedUSD), ]), + h('i.fa.fa-ellipsis-h.fa-lg.token-list-item__ellipsis.cursor-pointer', { + onClick: (e) => { + e.stopPropagation() + this.setState({ tokenMenuOpen: true }) + }, + }), + + tokenMenuOpen && h(TokenMenuDropdown, { + onClose: () => this.setState({ tokenMenuOpen: false }), + }), + /* h('button', { onClick: this.send.bind(this, address), |