diff options
Diffstat (limited to 'ui/app/components/currency-display/currency-display.component.js')
-rw-r--r-- | ui/app/components/currency-display/currency-display.component.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/ui/app/components/currency-display/currency-display.component.js b/ui/app/components/currency-display/currency-display.component.js new file mode 100644 index 000000000..389791b42 --- /dev/null +++ b/ui/app/components/currency-display/currency-display.component.js @@ -0,0 +1,26 @@ +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> + ) + } +} |