From 7581a4906f25c22ee773bd8537f277b28600d6cf Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Thu, 12 Jul 2018 10:51:42 -0230 Subject: Add tooltip to menu icon in tx-view --- app/_locales/en/messages.json | 3 +++ ui/app/components/tx-view.js | 25 ++++++++++++++++--------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 897f16f04..4b03c6747 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -515,6 +515,9 @@ "mainnet": { "message": "Main Ethereum Network" }, + "menu": { + "message": "Menu" + }, "message": { "message": "Message" }, diff --git a/ui/app/components/tx-view.js b/ui/app/components/tx-view.js index 014497fcd..e848297e7 100644 --- a/ui/app/components/tx-view.js +++ b/ui/app/components/tx-view.js @@ -11,6 +11,7 @@ const { SEND_ROUTE } = require('../routes') const { checksumAddress: toChecksumAddress } = require('../util') const BalanceComponent = require('./balance-component') +const Tooltip = require('./tooltip') const TxList = require('./tx-list') const SelectedAccount = require('./selected-account') @@ -103,7 +104,8 @@ TxView.prototype.renderButtons = function () { } TxView.prototype.render = function () { - const { isMascara } = this.props + const { hideSidebar, isMascara, showSidebar, sidebarOpen } = this.props + const { t } = this.context return h('div.tx-view.flex-column', { style: {}, @@ -120,14 +122,19 @@ TxView.prototype.render = function () { }, }, [ - h('div.fa.fa-bars', { - style: { - fontSize: '1.3em', - cursor: 'pointer', - padding: '10px', - }, - onClick: () => this.props.sidebarOpen ? this.props.hideSidebar() : this.props.showSidebar(), - }), + h(Tooltip, { + title: t('menu'), + position: 'bottom', + }, [ + h('div.fa.fa-bars', { + style: { + fontSize: '1.3em', + cursor: 'pointer', + padding: '10px', + }, + onClick: () => sidebarOpen ? hideSidebar() : showSidebar(), + }), + ]), h(SelectedAccount), -- cgit v1.2.3