diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2016-07-08 07:33:06 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2016-07-08 07:33:06 +0800 |
commit | 86b7cc6637edefd2f628238a2abff540c82e1a78 (patch) | |
tree | a6126d8b83ec7b66cd2a138c670863beedbefba1 /ui/app/components/eth-balance.js | |
parent | 9a9c1f2cd48235be47e65b42c84bd9bf55ecbec4 (diff) | |
parent | 44a45f38be5251eacd2c43ebbc55acf34f65084c (diff) | |
download | tangerine-wallet-browser-86b7cc6637edefd2f628238a2abff540c82e1a78.tar tangerine-wallet-browser-86b7cc6637edefd2f628238a2abff540c82e1a78.tar.gz tangerine-wallet-browser-86b7cc6637edefd2f628238a2abff540c82e1a78.tar.bz2 tangerine-wallet-browser-86b7cc6637edefd2f628238a2abff540c82e1a78.tar.lz tangerine-wallet-browser-86b7cc6637edefd2f628238a2abff540c82e1a78.tar.xz tangerine-wallet-browser-86b7cc6637edefd2f628238a2abff540c82e1a78.tar.zst tangerine-wallet-browser-86b7cc6637edefd2f628238a2abff540c82e1a78.zip |
Resolve merge conflict.
Diffstat (limited to 'ui/app/components/eth-balance.js')
-rw-r--r-- | ui/app/components/eth-balance.js | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/ui/app/components/eth-balance.js b/ui/app/components/eth-balance.js index e31b3ed97..301674083 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,30 +32,37 @@ 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: { + fontSize: props.fontSize || '12px', + }, + }, balance + ' '), + h(tagName, { style: { - color: ' #AEAEAE', - fontSize: '12px', + color: props.labelColor || '#AEAEAE', + fontSize: props.fontSize || '12px', }, }, label), ]), |