aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/token-balance/token-balance.component.js
blob: 2b4f73980760a8f955ed878735c974e4e8ad13b7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import classnames from 'classnames'

export default class TokenBalance extends PureComponent {
  static propTypes = {
    string: PropTypes.string,
    symbol: PropTypes.string,
    error: PropTypes.string,
    className: PropTypes.string,
    withSymbol: PropTypes.bool,
  }

  render () {
    const { className, string, withSymbol, symbol } = this.props

    return (
      <div className={classnames('hide-text-overflow', className)}>
        { string + (withSymbol ? ` ${symbol}` : '') }
      </div>
    )
  }
}