aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/wallet-view.js
diff options
context:
space:
mode:
authorsdtsui <szehungdanieltsui@gmail.com>2017-08-03 05:17:58 +0800
committersdtsui <szehungdanieltsui@gmail.com>2017-08-03 05:17:58 +0800
commit9ebdc343aa32c36bdff9debcecc3c75485939e2a (patch)
treef7e7e8813ad328e63efc73b2ab8b6c5025962334 /ui/app/components/wallet-view.js
parentdfa10763e36f745d82fb62adc4ac42773d266da4 (diff)
downloadtangerine-wallet-browser-9ebdc343aa32c36bdff9debcecc3c75485939e2a.tar.gz
tangerine-wallet-browser-9ebdc343aa32c36bdff9debcecc3c75485939e2a.tar.zst
tangerine-wallet-browser-9ebdc343aa32c36bdff9debcecc3c75485939e2a.zip
Implement custom sidebar, with close button
Diffstat (limited to 'ui/app/components/wallet-view.js')
-rw-r--r--ui/app/components/wallet-view.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/ui/app/components/wallet-view.js b/ui/app/components/wallet-view.js
index 63335dd93..2a626a930 100644
--- a/ui/app/components/wallet-view.js
+++ b/ui/app/components/wallet-view.js
@@ -12,16 +12,17 @@ module.exports = connect(mapStateToProps, mapDispatchToProps)(WalletView)
function mapStateToProps (state) {
return {
network: state.metamask.network,
+ sidebarOpen: state.appState.sidebarOpen,
}
}
function mapDispatchToProps (dispatch) {
return {
showSendPage: () => {dispatch(actions.showSendPage())},
+ hideSidebar: () => {dispatch(actions.hideSidebar())},
}
}
-
inherits(WalletView, Component)
function WalletView () {
Component.call(this)
@@ -31,7 +32,7 @@ const noop = () => {}
WalletView.prototype.render = function () {
const selected = '0x82df11beb942BEeeD58d466fCb0F0791365C7684'
- const { network, responsiveDisplayClassname } = this.props
+ const { network, responsiveDisplayClassname, style } = this.props
return h('div.wallet-view.flex-column' + (responsiveDisplayClassname || ''), {
style: {
@@ -41,9 +42,18 @@ WalletView.prototype.render = function () {
flexBasis: '230px', // .333*345
height: '82vh',
background: '#FAFAFA', // TODO: add to reusable colors
+ ...style,
}
}, [
+ h('div.phone-visible.fa.fa-bars', {
+ onClick: () => {
+ console.log("click received-inwalletview")
+ this.props.hideSidebar()
+ }
+ }, [
+ ]),
+
// TODO: Separate component: wallet account details
h('div.flex-row.flex-center', {
style: {