aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/hex-to-decimal/hex-to-decimal.component.js
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2018-09-01 03:32:26 +0800
committerAlexander Tseung <alextsg@gmail.com>2018-09-13 10:48:51 +0800
commit63ba6d1df4c98bd94f46e979bdffb38fe019aa51 (patch)
tree6e48e2363f8d3202eba10aba3010cde9eb0c0676 /ui/app/components/hex-to-decimal/hex-to-decimal.component.js
parent18c94c4ac9a2e6981bb9dedc49b7351582153707 (diff)
downloadtangerine-wallet-browser-63ba6d1df4c98bd94f46e979bdffb38fe019aa51.tar
tangerine-wallet-browser-63ba6d1df4c98bd94f46e979bdffb38fe019aa51.tar.gz
tangerine-wallet-browser-63ba6d1df4c98bd94f46e979bdffb38fe019aa51.tar.bz2
tangerine-wallet-browser-63ba6d1df4c98bd94f46e979bdffb38fe019aa51.tar.lz
tangerine-wallet-browser-63ba6d1df4c98bd94f46e979bdffb38fe019aa51.tar.xz
tangerine-wallet-browser-63ba6d1df4c98bd94f46e979bdffb38fe019aa51.tar.zst
tangerine-wallet-browser-63ba6d1df4c98bd94f46e979bdffb38fe019aa51.zip
Add HexToDecimal component
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>
+ )
+ }
+}