From 3f9c3d76b6edb70f91363c1e0787707ed1440c41 Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Mon, 16 Jul 2018 18:21:02 -0230 Subject: Add hex data row to send screen --- .../send/send-content/send-hex-data-row/index.js | 1 + .../send-hex-data-row.component.js | 38 ++++++++++++++++++++++ .../send-hex-data-row.container.js | 0 3 files changed, 39 insertions(+) create mode 100644 ui/app/components/send/send-content/send-hex-data-row/index.js create mode 100644 ui/app/components/send/send-content/send-hex-data-row/send-hex-data-row.component.js create mode 100644 ui/app/components/send/send-content/send-hex-data-row/send-hex-data-row.container.js (limited to 'ui/app/components/send/send-content/send-hex-data-row') diff --git a/ui/app/components/send/send-content/send-hex-data-row/index.js b/ui/app/components/send/send-content/send-hex-data-row/index.js new file mode 100644 index 000000000..4371ef83d --- /dev/null +++ b/ui/app/components/send/send-content/send-hex-data-row/index.js @@ -0,0 +1 @@ +export { default } from './send-hex-data-row.component' diff --git a/ui/app/components/send/send-content/send-hex-data-row/send-hex-data-row.component.js b/ui/app/components/send/send-content/send-hex-data-row/send-hex-data-row.component.js new file mode 100644 index 000000000..eaffce359 --- /dev/null +++ b/ui/app/components/send/send-content/send-hex-data-row/send-hex-data-row.component.js @@ -0,0 +1,38 @@ +import React, { Component } from 'react' +import PropTypes from 'prop-types' +import SendRowWrapper from '../send-row-wrapper' + +export default class SendHexDataRow extends Component { + static propTypes = { + data: PropTypes.string, + inError: PropTypes.bool, + }; + + static contextTypes = { + t: PropTypes.func, + }; + + onInput = (event) => { + event.target.value = event.target.value.replace(/\n/g, '') + } + + render () { + const { + inError, + } = this.props + + return ( + +