aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/eth-balance.js
diff options
context:
space:
mode:
authorDan Finlay <somniac@me.com>2016-07-08 06:11:21 +0800
committerGitHub <noreply@github.com>2016-07-08 06:11:21 +0800
commit2bd31c3e5024ca88b18190c145008ba87736f129 (patch)
tree27b3f32b69b302de0ac0750ad5b8a34f5f868da5 /ui/app/components/eth-balance.js
parent3fb36b2dd388d7344fd7b3b7e32dcbafeabc9b48 (diff)
parentac808e681fe6a8666a4842cf7fde23345f63e96a (diff)
downloadtangerine-wallet-browser-2bd31c3e5024ca88b18190c145008ba87736f129.tar
tangerine-wallet-browser-2bd31c3e5024ca88b18190c145008ba87736f129.tar.gz
tangerine-wallet-browser-2bd31c3e5024ca88b18190c145008ba87736f129.tar.bz2
tangerine-wallet-browser-2bd31c3e5024ca88b18190c145008ba87736f129.tar.lz
tangerine-wallet-browser-2bd31c3e5024ca88b18190c145008ba87736f129.tar.xz
tangerine-wallet-browser-2bd31c3e5024ca88b18190c145008ba87736f129.tar.zst
tangerine-wallet-browser-2bd31c3e5024ca88b18190c145008ba87736f129.zip
Merge pull request #406 from MetaMask/ConfirmationStyle
Update transaction confirmation style
Diffstat (limited to 'ui/app/components/eth-balance.js')
-rw-r--r--ui/app/components/eth-balance.js42
1 files changed, 30 insertions, 12 deletions
diff --git a/ui/app/components/eth-balance.js b/ui/app/components/eth-balance.js
index e31b3ed97..9e445fe3f 100644
--- a/ui/app/components/eth-balance.js
+++ b/ui/app/components/eth-balance.js
@@ -12,9 +12,11 @@ function EthBalanceComponent () {
}
EthBalanceComponent.prototype.render = function () {
- var state = this.props
- var style = state.style
- var value = formatBalance(state.value)
+ var props = this.props
+ var style = props.style
+
+ const value = formatBalance(props.value)
+
return (
h('.ether-balance', {
@@ -30,33 +32,49 @@ EthBalanceComponent.prototype.render = function () {
)
}
EthBalanceComponent.prototype.renderBalance = function (value) {
+ const props = this.props
if (value === 'None') return value
var balanceObj = generateBalanceObject(value)
-
var balance = balanceObj.balance
var label = balanceObj.label
+ var tagName = props.inline ? 'span' : 'div'
+ var topTag = props.inline ? 'div' : '.flex-column'
return (
+
h(Tooltip, {
position: 'bottom',
title: value.split(' ')[0],
}, [
- h('.flex-column', {
+ h(topTag, {
style: {
alignItems: 'flex-end',
- lineHeight: '13px',
- fontFamily: 'Montserrat Light',
+ 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',
},
- }, label),
+ }, balance + ' '),
+ h(tagName, {
+ style: {
+ color: props.labelColor || '#AEAEAE',
+ fontSize: props.fontSize || '12px',
+ },
+ }, [
+ h('div', balance),
+ h('div', {
+ style: {
+ color: '#AEAEAE',
+ fontSize: '12px',
+ },
+ }, label),
+ ]),
]),
])
+
)
}