aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/hex-to-decimal/hex-to-decimal.component.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/hex-to-decimal/hex-to-decimal.component.js')
-rw-r--r--ui/app/components/hex-to-decimal/hex-to-decimal.component.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/ui/app/components/hex-to-decimal/hex-to-decimal.component.js b/ui/app/components/hex-to-decimal/hex-to-decimal.component.js
new file mode 100644
index 000000000..6847a6919
--- /dev/null
+++ b/ui/app/components/hex-to-decimal/hex-to-decimal.component.js
@@ -0,0 +1,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>
+ )
+ }
+}