diff options
author | Dan <danjm.com@gmail.com> | 2017-08-29 01:14:01 +0800 |
---|---|---|
committer | Dan <danjm.com@gmail.com> | 2017-08-29 22:56:20 +0800 |
commit | 0a44c824586f74a770c1e6c618e62279b5dc773b (patch) | |
tree | d72d95fe25e782964679edf513fe967a6509b8e9 /ui/app/components | |
parent | b785beb54665acc47d0b5e65cf4e742bd1853110 (diff) | |
download | tangerine-wallet-browser-0a44c824586f74a770c1e6c618e62279b5dc773b.tar.gz tangerine-wallet-browser-0a44c824586f74a770c1e6c618e62279b5dc773b.tar.zst tangerine-wallet-browser-0a44c824586f74a770c1e6c618e62279b5dc773b.zip |
Styles and behaviour correct
Diffstat (limited to 'ui/app/components')
-rw-r--r-- | ui/app/components/fiat-value.js | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/ui/app/components/fiat-value.js b/ui/app/components/fiat-value.js index 8a64a1cfc..665789353 100644 --- a/ui/app/components/fiat-value.js +++ b/ui/app/components/fiat-value.js @@ -12,7 +12,7 @@ function FiatValue () { FiatValue.prototype.render = function () { const props = this.props - const { conversionRate, currentCurrency } = props + const { conversionRate, currentCurrency, style } = props const value = formatBalance(props.value, 6) @@ -28,16 +28,18 @@ FiatValue.prototype.render = function () { fiatTooltipNumber = 'Unknown' } - return fiatDisplay(fiatDisplayNumber, currentCurrency) + return fiatDisplay(fiatDisplayNumber, currentCurrency, style) } -function fiatDisplay (fiatDisplayNumber, fiatSuffix) { +function fiatDisplay (fiatDisplayNumber, fiatSuffix, styleOveride = {}) { + const { fontSize, color, fontFamily, lineHeight } = styleOveride + if (fiatDisplayNumber !== 'N/A') { return h('.flex-row', { style: { alignItems: 'flex-end', - lineHeight: '13px', - fontFamily: 'Montserrat Light', + lineHeight: lineHeight || '13px', + fontFamily: fontFamily || 'Montserrat Light', textRendering: 'geometricPrecision', }, }, [ @@ -45,15 +47,15 @@ function fiatDisplay (fiatDisplayNumber, fiatSuffix) { style: { width: '100%', textAlign: 'right', - fontSize: '12px', - color: '#333333', + fontSize: fontSize || '12px', + color: color || '#333333', }, }, fiatDisplayNumber), h('div', { style: { - color: '#AEAEAE', + color: color || '#AEAEAE', marginLeft: '5px', - fontSize: '12px', + fontSize: fontSize || '12px', }, }, fiatSuffix), ]) |