aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-09-07 08:08:56 +0800
committerDan Finlay <dan@danfinlay.com>2016-09-07 08:08:56 +0800
commitc46de79c10ba36c67176e4e02bd2b4adcb0e268f (patch)
tree207432b34d0f59b49e755b62353f1eda8f76f845 /ui
parent90638f95c079bf1fbfccb9cdb9eea6bb0823e1bd (diff)
downloadtangerine-wallet-browser-c46de79c10ba36c67176e4e02bd2b4adcb0e268f.tar
tangerine-wallet-browser-c46de79c10ba36c67176e4e02bd2b4adcb0e268f.tar.gz
tangerine-wallet-browser-c46de79c10ba36c67176e4e02bd2b4adcb0e268f.tar.bz2
tangerine-wallet-browser-c46de79c10ba36c67176e4e02bd2b4adcb0e268f.tar.lz
tangerine-wallet-browser-c46de79c10ba36c67176e4e02bd2b4adcb0e268f.tar.xz
tangerine-wallet-browser-c46de79c10ba36c67176e4e02bd2b4adcb0e268f.tar.zst
tangerine-wallet-browser-c46de79c10ba36c67176e4e02bd2b4adcb0e268f.zip
Got basic fiat display modularized
Diffstat (limited to 'ui')
-rw-r--r--ui/app/components/eth-balance.js46
-rw-r--r--ui/app/components/fiat-value.js1
-rw-r--r--ui/app/components/tooltip.js1
3 files changed, 26 insertions, 22 deletions
diff --git a/ui/app/components/eth-balance.js b/ui/app/components/eth-balance.js
index c77bda626..b9caf65b9 100644
--- a/ui/app/components/eth-balance.js
+++ b/ui/app/components/eth-balance.js
@@ -57,30 +57,32 @@ EthBalanceComponent.prototype.renderBalance = function (value) {
h(Tooltip, {
position: 'bottom',
title: `${ethNumber} ${ethSuffix}`,
- }, [
- h('.flex-column', {
- style: {
- alignItems: 'flex-end',
- lineHeight: '13px',
- fontFamily: 'Montserrat Light',
- textRendering: 'geometricPrecision',
- },
- }, [
- h('div', {
+ }, h('div.flex-column', [
+ h('.flex-row', {
style: {
- width: '100%',
- textAlign: 'right',
+ alignItems: 'flex-end',
+ lineHeight: '13px',
+ fontFamily: 'Montserrat Light',
+ textRendering: 'geometricPrecision',
},
- }, this.props.incoming ? `+${balance}` : balance),
- h('div', {
- style: {
- color: ' #AEAEAE',
- fontSize: '12px',
- },
- }, label),
- ]),
+ }, [
+ h('div', {
+ style: {
+ width: '100%',
+ textAlign: 'right',
+ },
+ }, this.props.incoming ? `+${balance}` : balance),
+ h('div', {
+ style: {
+ color: ' #AEAEAE',
+ fontSize: '12px',
+ marginLeft: '5px',
+ },
+ }, label),
+ ]),
- showFiat ? h(FiatValue, { value: props.value }) : null,
- ])
+ showFiat ? h(FiatValue, { value: props.value }) : null,
+ ])
+ )
)
}
diff --git a/ui/app/components/fiat-value.js b/ui/app/components/fiat-value.js
index 57c67e117..406dcf23f 100644
--- a/ui/app/components/fiat-value.js
+++ b/ui/app/components/fiat-value.js
@@ -32,6 +32,7 @@ FiatValue.prototype.render = function () {
fiatDisplayNumber = fiatTooltipNumber.toFixed(2)
} else {
fiatDisplayNumber = 'N/A'
+ fiatTooltipNumber = 'Unknown'
}
var fiatSuffix = props.currentFiat
diff --git a/ui/app/components/tooltip.js b/ui/app/components/tooltip.js
index 440393b08..757ad0cd6 100644
--- a/ui/app/components/tooltip.js
+++ b/ui/app/components/tooltip.js
@@ -11,6 +11,7 @@ function Tooltip () {
}
Tooltip.prototype.render = function () {
+
const props = this.props
const { position, title, children } = props