aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/hex-to-decimal/hex-to-decimal.component.js
blob: 6847a6919a7a308932ff69a641af315b34cfddf0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import { hexToDecimal } from '../../helpers/conversions.util'

export default class HexToDecimal extends PureComponent {
  static propTypes = {
    className: PropTypes.string,
    value: PropTypes.string,
  }

  render () {
    const { className, value } = this.props
    const decimalValue = hexToDecimal(value)

    return (
      <div className={className}>
        { decimalValue }
      </div>
    )
  }
}