aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorWhymarrh Whitby <whymarrh.whitby@gmail.com>2018-07-17 04:51:02 +0800
committerWhymarrh Whitby <whymarrh.whitby@gmail.com>2018-07-18 20:22:13 +0800
commit3f9c3d76b6edb70f91363c1e0787707ed1440c41 (patch)
treefdf98043ed205970c53f334240f27934ef3e80ed /ui
parentf6ca06f775a739c8b449405c5e96b03151a6a33c (diff)
downloadtangerine-wallet-browser-3f9c3d76b6edb70f91363c1e0787707ed1440c41.tar
tangerine-wallet-browser-3f9c3d76b6edb70f91363c1e0787707ed1440c41.tar.gz
tangerine-wallet-browser-3f9c3d76b6edb70f91363c1e0787707ed1440c41.tar.bz2
tangerine-wallet-browser-3f9c3d76b6edb70f91363c1e0787707ed1440c41.tar.lz
tangerine-wallet-browser-3f9c3d76b6edb70f91363c1e0787707ed1440c41.tar.xz
tangerine-wallet-browser-3f9c3d76b6edb70f91363c1e0787707ed1440c41.tar.zst
tangerine-wallet-browser-3f9c3d76b6edb70f91363c1e0787707ed1440c41.zip
Add hex data row to send screen
Diffstat (limited to 'ui')
-rw-r--r--ui/app/components/send/send-content/send-content.component.js2
-rw-r--r--ui/app/components/send/send-content/send-hex-data-row/index.js1
-rw-r--r--ui/app/components/send/send-content/send-hex-data-row/send-hex-data-row.component.js38
-rw-r--r--ui/app/components/send/send-content/send-hex-data-row/send-hex-data-row.container.js0
-rw-r--r--ui/app/css/itcss/components/send.scss4
5 files changed, 43 insertions, 2 deletions
diff --git a/ui/app/components/send/send-content/send-content.component.js b/ui/app/components/send/send-content/send-content.component.js
index adc114c0e..7a0b1a18e 100644
--- a/ui/app/components/send/send-content/send-content.component.js
+++ b/ui/app/components/send/send-content/send-content.component.js
@@ -4,6 +4,7 @@ import PageContainerContent from '../../page-container/page-container-content.co
import SendAmountRow from './send-amount-row/'
import SendFromRow from './send-from-row/'
import SendGasRow from './send-gas-row/'
+import SendHexDataRow from './send-hex-data-row'
import SendToRow from './send-to-row/'
export default class SendContent extends Component {
@@ -20,6 +21,7 @@ export default class SendContent extends Component {
<SendToRow updateGas={(updateData) => this.props.updateGas(updateData)} />
<SendAmountRow updateGas={(updateData) => this.props.updateGas(updateData)} />
<SendGasRow />
+ <SendHexDataRow />
</div>
</PageContainerContent>
)
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 (
+ <SendRowWrapper
+ label={`${this.context.t('hexData')}:`}
+ showError={inError}
+ errorType={'amount'}
+ >
+ <textarea
+ onInput={this.onInput}
+ placeholder="Optional"
+ className="send-v2__hex-data__input"
+ />
+ </SendRowWrapper>
+ )
+ }
+}
diff --git a/ui/app/components/send/send-content/send-hex-data-row/send-hex-data-row.container.js b/ui/app/components/send/send-content/send-hex-data-row/send-hex-data-row.container.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/ui/app/components/send/send-content/send-hex-data-row/send-hex-data-row.container.js
diff --git a/ui/app/css/itcss/components/send.scss b/ui/app/css/itcss/components/send.scss
index c168242cf..e9c872ea7 100644
--- a/ui/app/css/itcss/components/send.scss
+++ b/ui/app/css/itcss/components/send.scss
@@ -628,7 +628,7 @@
}
}
- &__to-autocomplete, &__memo-text-area {
+ &__to-autocomplete, &__memo-text-area, &__hex-data {
&__input {
height: 54px;
width: 100%;
@@ -899,4 +899,4 @@
.sliders-icon {
color: $curious-blue;
-} \ No newline at end of file
+}