mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-24 19:10:22 +01:00
27 lines
601 B
JavaScript
27 lines
601 B
JavaScript
import React, { PureComponent } from 'react'
|
|
import PropTypes from 'prop-types'
|
|
import { ETH } from '../../constants/common'
|
|
|
|
export default class CurrencyDisplay extends PureComponent {
|
|
static propTypes = {
|
|
className: PropTypes.string,
|
|
displayValue: PropTypes.string,
|
|
prefix: PropTypes.string,
|
|
currency: PropTypes.oneOf([ETH]),
|
|
}
|
|
|
|
render () {
|
|
const { className, displayValue, prefix } = this.props
|
|
const text = `${prefix || ''}${displayValue}`
|
|
|
|
return (
|
|
<div
|
|
className={className}
|
|
title={text}
|
|
>
|
|
{ text }
|
|
</div>
|
|
)
|
|
}
|
|
}
|