diff options
author | kumavis <aaron@kumavis.me> | 2018-10-26 10:24:30 +0800 |
---|---|---|
committer | kumavis <aaron@kumavis.me> | 2018-10-26 10:24:30 +0800 |
commit | 9b42416fc0d92662d1a21759db357e7f439d7a7b (patch) | |
tree | 4fb658d739a7127d4c18a22b4abe556bfc3a194e /ui/app/components/currency-display/currency-display.component.js | |
parent | 9b501b7c42ebebb61ac3130d1e84d36efcac9b7e (diff) | |
parent | 55c66b0d988fac6b2ed5948cf4dcd20fd486070e (diff) | |
download | dexon-wallet-9b42416fc0d92662d1a21759db357e7f439d7a7b.tar.gz dexon-wallet-9b42416fc0d92662d1a21759db357e7f439d7a7b.tar.zst dexon-wallet-9b42416fc0d92662d1a21759db357e7f439d7a7b.zip |
Merge branch 'develop' of github.com:MetaMask/metamask-extension into HowardBraham-develop
Diffstat (limited to 'ui/app/components/currency-display/currency-display.component.js')
-rw-r--r-- | ui/app/components/currency-display/currency-display.component.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/ui/app/components/currency-display/currency-display.component.js b/ui/app/components/currency-display/currency-display.component.js index 5f5717be..f39e6026 100644 --- a/ui/app/components/currency-display/currency-display.component.js +++ b/ui/app/components/currency-display/currency-display.component.js @@ -10,6 +10,7 @@ export default class CurrencyDisplay extends PureComponent { prefix: PropTypes.string, prefixComponent: PropTypes.node, style: PropTypes.object, + suffix: PropTypes.string, // Used in container currency: PropTypes.oneOf([ETH]), denomination: PropTypes.oneOf([GWEI]), @@ -19,17 +20,25 @@ export default class CurrencyDisplay extends PureComponent { } render () { - const { className, displayValue, prefix, prefixComponent, style } = this.props + const { className, displayValue, prefix, prefixComponent, style, suffix } = this.props const text = `${prefix || ''}${displayValue}` + const title = `${text} ${suffix}` return ( <div className={classnames('currency-display-component', className)} style={style} - title={text} + title={title} > { prefixComponent} <span className="currency-display-component__text">{ text }</span> + { + suffix && ( + <span className="currency-display-component__suffix"> + { suffix } + </span> + ) + } </div> ) } |