aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/currency-display/currency-display.component.js
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2018-10-21 19:12:40 +0800
committerAlexander Tseung <alextsg@gmail.com>2018-10-21 22:01:20 +0800
commit614995c0e933fcc984126eee20fb7dd4533e8e5b (patch)
tree7f2b29433e6df871122b74770e1106206889274f /ui/app/components/currency-display/currency-display.component.js
parentba3617b685b9dcd8a62e0009ee2015c5997fead3 (diff)
downloadtangerine-wallet-browser-614995c0e933fcc984126eee20fb7dd4533e8e5b.tar.gz
tangerine-wallet-browser-614995c0e933fcc984126eee20fb7dd4533e8e5b.tar.zst
tangerine-wallet-browser-614995c0e933fcc984126eee20fb7dd4533e8e5b.zip
Fix account display width for large currency values
Diffstat (limited to 'ui/app/components/currency-display/currency-display.component.js')
-rw-r--r--ui/app/components/currency-display/currency-display.component.js13
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 5f5717be3..f39e60269 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>
)
}