diff options
author | Chi Kei Chan <chikeichan@gmail.com> | 2017-08-30 02:50:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-30 02:50:12 +0800 |
commit | e23ae5371b410b9fe94ac83be08f4de71c184eb0 (patch) | |
tree | 0ef0cebe952b2587fff55010bb15573ab0e60c88 /ui/app/components/fiat-value.js | |
parent | 4076496c8ea8c5a771db421b6c6a037c6ad48df1 (diff) | |
parent | c605c9897d40f8fc2568b63d33cfc018635bcf25 (diff) | |
download | tangerine-wallet-browser-e23ae5371b410b9fe94ac83be08f4de71c184eb0.tar.gz tangerine-wallet-browser-e23ae5371b410b9fe94ac83be08f4de71c184eb0.tar.zst tangerine-wallet-browser-e23ae5371b410b9fe94ac83be08f4de71c184eb0.zip |
Merge pull request #1982 from danjm/send-gas-tooltip
Send Gas Tooltip
Diffstat (limited to 'ui/app/components/fiat-value.js')
-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), ]) |