From ce463f3aff07c3cb73370cc1446a6b64f91ceb05 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Wed, 6 Jul 2016 22:48:02 -0700 Subject: Fixed up pending-tx-details --- ui/app/components/eth-balance.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ui/app/components/eth-balance.js') diff --git a/ui/app/components/eth-balance.js b/ui/app/components/eth-balance.js index 510b620f3..288a0fcaf 100644 --- a/ui/app/components/eth-balance.js +++ b/ui/app/components/eth-balance.js @@ -14,7 +14,8 @@ function EthBalanceComponent () { EthBalanceComponent.prototype.render = function () { var state = this.props var style = state.style - var value = formatBalance(state.value) + + const value = formatBalance(state.value) return ( -- cgit v1.2.3 From 97b60caac0dfabaa3652fde75cfafa9551bf47ce Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 7 Jul 2016 12:27:18 -0700 Subject: Add configurable params to eth-balance --- ui/app/components/eth-balance.js | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'ui/app/components/eth-balance.js') diff --git a/ui/app/components/eth-balance.js b/ui/app/components/eth-balance.js index 113e698ad..d50ac771d 100644 --- a/ui/app/components/eth-balance.js +++ b/ui/app/components/eth-balance.js @@ -11,10 +11,10 @@ function EthBalanceComponent () { } EthBalanceComponent.prototype.render = function () { - var state = this.props - var style = state.style + var props = this.props + var style = props.style - const value = formatBalance(state.value) + const value = formatBalance(props.value) return ( @@ -31,26 +31,33 @@ EthBalanceComponent.prototype.render = function () { ) } EthBalanceComponent.prototype.renderBalance = function (value) { + const props = this.props if (value === 'None') return value var balance = value.split(' ')[0] var label = value.split(' ')[1] + var tagName = props.inline ? 'span' : 'div' + var topTag = props.inline ? 'div' : '.flex-column' return ( - h('.flex-column', { + h(topTag, { style: { alignItems: 'flex-end', - lineHeight: '13px', - fontFamily: 'Montserrat Thin', + lineHeight: props.fontSize || '13px', + fontFamily: 'Montserrat Regular', textRendering: 'geometricPrecision', }, }, [ - h('div', balance), - h('div', { + h(tagName, { style: { - color: ' #AEAEAE', - fontSize: '12px', + fontSize: props.fontSize || '12px', + } + }, balance + ' '), + h(tagName, { + style: { + color: props.labelColor || '#AEAEAE', + fontSize: props.fontSize || '12px', }, }, label), ]) -- cgit v1.2.3 From 306035f57508cafd07c27407896a5ac32dc1b435 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 7 Jul 2016 12:41:07 -0700 Subject: Linted --- ui/app/components/eth-balance.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/app/components/eth-balance.js') diff --git a/ui/app/components/eth-balance.js b/ui/app/components/eth-balance.js index d50ac771d..79fc1d256 100644 --- a/ui/app/components/eth-balance.js +++ b/ui/app/components/eth-balance.js @@ -52,7 +52,7 @@ EthBalanceComponent.prototype.renderBalance = function (value) { h(tagName, { style: { fontSize: props.fontSize || '12px', - } + }, }, balance + ' '), h(tagName, { style: { -- cgit v1.2.3 From f71956b2ab748af8d9a11053a00c858370f340f3 Mon Sep 17 00:00:00 2001 From: kumavis Date: Thu, 7 Jul 2016 13:45:06 -0700 Subject: lint fix --- ui/app/components/eth-balance.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/app/components/eth-balance.js') diff --git a/ui/app/components/eth-balance.js b/ui/app/components/eth-balance.js index 975ba3acd..9e445fe3f 100644 --- a/ui/app/components/eth-balance.js +++ b/ui/app/components/eth-balance.js @@ -73,7 +73,7 @@ EthBalanceComponent.prototype.renderBalance = function (value) { }, }, label), ]), - ]) + ]), ]) ) -- cgit v1.2.3 From 33150cc721432e2464874079deac6974b38cf789 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Thu, 7 Jul 2016 15:22:10 -0700 Subject: Fixed eth_balance style, completing partial merge --- ui/app/components/eth-balance.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'ui/app/components/eth-balance.js') diff --git a/ui/app/components/eth-balance.js b/ui/app/components/eth-balance.js index 9e445fe3f..301674083 100644 --- a/ui/app/components/eth-balance.js +++ b/ui/app/components/eth-balance.js @@ -64,17 +64,8 @@ EthBalanceComponent.prototype.renderBalance = function (value) { color: props.labelColor || '#AEAEAE', fontSize: props.fontSize || '12px', }, - }, [ - h('div', balance), - h('div', { - style: { - color: '#AEAEAE', - fontSize: '12px', - }, - }, label), - ]), + }, label), ]), ]) - ) } -- cgit v1.2.3