You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
708 B
32 lines
708 B
const Component = require('react').Component
|
|
const h = require('react-hyperscript')
|
|
const inherits = require('util').inherits
|
|
const parseBalance = require('../util').parseBalance
|
|
const formatBalance = require('../util').formatBalance
|
|
|
|
module.exports = EthBalanceComponent
|
|
|
|
inherits(EthBalanceComponent, Component)
|
|
function EthBalanceComponent() {
|
|
Component.call(this)
|
|
}
|
|
|
|
EthBalanceComponent.prototype.render = function() {
|
|
var state = this.props
|
|
var style = state.style
|
|
var value = formatBalance(state.value)
|
|
|
|
return (
|
|
|
|
h('.ether-balance', {
|
|
style: style,
|
|
}, [
|
|
h('.ether-balance-amount', {
|
|
style: {
|
|
display: 'inline',
|
|
},
|
|
}, value),
|
|
])
|
|
|
|
)
|
|
}
|
|
|