diff options
author | Alexander Tseung <alextsg@gmail.com> | 2018-09-01 03:32:26 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@gmail.com> | 2018-09-13 10:48:51 +0800 |
commit | 63ba6d1df4c98bd94f46e979bdffb38fe019aa51 (patch) | |
tree | 6e48e2363f8d3202eba10aba3010cde9eb0c0676 /ui/app/components/hex-to-decimal/hex-to-decimal.component.js | |
parent | 18c94c4ac9a2e6981bb9dedc49b7351582153707 (diff) | |
download | tangerine-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.js | 21 |
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> + ) + } +} |