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,8 +57,8 @@ EthBalanceComponent.prototype.renderBalance = function (value) {
h(Tooltip, {
position: 'bottom',
title: `${ethNumber} ${ethSuffix}`,
}, [
h('.flex-column', {
}, h('div.flex-column', [
h('.flex-row', {
style: {
alignItems: 'flex-end',
lineHeight: '13px',
@ -76,6 +76,7 @@ EthBalanceComponent.prototype.renderBalance = function (value) {
style: {
color: ' #AEAEAE',
fontSize: '12px',
marginLeft: '5px',
},
}, label),
]),
@ -83,4 +84,5 @@ EthBalanceComponent.prototype.renderBalance = function (value) {
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