1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Got basic fiat display modularized

This commit is contained in:
Dan Finlay 2016-09-06 17:08:56 -07:00
parent 90638f95c0
commit c46de79c10
3 changed files with 26 additions and 22 deletions

View File

@ -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,
])
)
)
}

View File

@ -32,6 +32,7 @@ FiatValue.prototype.render = function () {
fiatDisplayNumber = fiatTooltipNumber.toFixed(2)
} else {
fiatDisplayNumber = 'N/A'
fiatTooltipNumber = 'Unknown'
}
var fiatSuffix = props.currentFiat

View File

@ -11,6 +11,7 @@ function Tooltip () {
}
Tooltip.prototype.render = function () {
const props = this.props
const { position, title, children } = props