aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/token-cell.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2017-09-29 18:10:50 +0800
committerChi Kei Chan <chikeichan@gmail.com>2017-10-02 10:02:21 +0800
commit47ebcbb2ed09a4cd4b062c5fa4cb6d259369149f (patch)
treee465ea9a722bbaac505681787c3739e7792209e6 /ui/app/components/token-cell.js
parentff64fe98dde7746775396cbf94d63a1a0e91d069 (diff)
downloadtangerine-wallet-browser-47ebcbb2ed09a4cd4b062c5fa4cb6d259369149f.tar.gz
tangerine-wallet-browser-47ebcbb2ed09a4cd4b062c5fa4cb6d259369149f.tar.zst
tangerine-wallet-browser-47ebcbb2ed09a4cd4b062c5fa4cb6d259369149f.zip
Token menu ui.
Diffstat (limited to 'ui/app/components/token-cell.js')
-rw-r--r--ui/app/components/token-cell.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/ui/app/components/token-cell.js b/ui/app/components/token-cell.js
index e87d2c859..df73577e9 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),