diff options
Diffstat (limited to 'ui/app/components/hex-to-decimal')
3 files changed, 0 insertions, 48 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 deleted file mode 100644 index 6847a6919..000000000 --- a/ui/app/components/hex-to-decimal/hex-to-decimal.component.js +++ /dev/null @@ -1,21 +0,0 @@ -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> - ) - } -} diff --git a/ui/app/components/hex-to-decimal/index.js b/ui/app/components/hex-to-decimal/index.js deleted file mode 100644 index 6e8567ca9..000000000 --- a/ui/app/components/hex-to-decimal/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './hex-to-decimal.component' diff --git a/ui/app/components/hex-to-decimal/tests/hex-to-decimal.component.test.js b/ui/app/components/hex-to-decimal/tests/hex-to-decimal.component.test.js deleted file mode 100644 index c98da9ad4..000000000 --- a/ui/app/components/hex-to-decimal/tests/hex-to-decimal.component.test.js +++ /dev/null @@ -1,26 +0,0 @@ -import React from 'react' -import assert from 'assert' -import { shallow } from 'enzyme' -import HexToDecimal from '../hex-to-decimal.component' - -describe('HexToDecimal Component', () => { - it('should render a prefixed hex as a decimal with a className', () => { - const wrapper = shallow(<HexToDecimal - value="0x3039" - className="hex-to-decimal" - />) - - assert.ok(wrapper.hasClass('hex-to-decimal')) - assert.equal(wrapper.text(), '12345') - }) - - it('should render an unprefixed hex as a decimal with a className', () => { - const wrapper = shallow(<HexToDecimal - value="1A85" - className="hex-to-decimal" - />) - - assert.ok(wrapper.hasClass('hex-to-decimal')) - assert.equal(wrapper.text(), '6789') - }) -}) |