Add hex data row to send screen

feature/default_network_editable
Whymarrh Whitby 6 years ago
parent f6ca06f775
commit 3f9c3d76b6
  1. 2
      ui/app/components/send/send-content/send-content.component.js
  2. 1
      ui/app/components/send/send-content/send-hex-data-row/index.js
  3. 38
      ui/app/components/send/send-content/send-hex-data-row/send-hex-data-row.component.js
  4. 0
      ui/app/components/send/send-content/send-hex-data-row/send-hex-data-row.container.js
  5. 4
      ui/app/css/itcss/components/send.scss

@ -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>
)

@ -0,0 +1 @@
export { default } from './send-hex-data-row.component'

@ -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>
)
}
}

@ -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;
}
}

Loading…
Cancel
Save