mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Add hex data row to send screen
This commit is contained in:
parent
f6ca06f775
commit
3f9c3d76b6
@ -4,6 +4,7 @@ import PageContainerContent from '../../page-container/page-container-content.co
|
|||||||
import SendAmountRow from './send-amount-row/'
|
import SendAmountRow from './send-amount-row/'
|
||||||
import SendFromRow from './send-from-row/'
|
import SendFromRow from './send-from-row/'
|
||||||
import SendGasRow from './send-gas-row/'
|
import SendGasRow from './send-gas-row/'
|
||||||
|
import SendHexDataRow from './send-hex-data-row'
|
||||||
import SendToRow from './send-to-row/'
|
import SendToRow from './send-to-row/'
|
||||||
|
|
||||||
export default class SendContent extends Component {
|
export default class SendContent extends Component {
|
||||||
@ -20,6 +21,7 @@ export default class SendContent extends Component {
|
|||||||
<SendToRow updateGas={(updateData) => this.props.updateGas(updateData)} />
|
<SendToRow updateGas={(updateData) => this.props.updateGas(updateData)} />
|
||||||
<SendAmountRow updateGas={(updateData) => this.props.updateGas(updateData)} />
|
<SendAmountRow updateGas={(updateData) => this.props.updateGas(updateData)} />
|
||||||
<SendGasRow />
|
<SendGasRow />
|
||||||
|
<SendHexDataRow />
|
||||||
</div>
|
</div>
|
||||||
</PageContainerContent>
|
</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 {
|
&__input {
|
||||||
height: 54px;
|
height: 54px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -899,4 +899,4 @@
|
|||||||
|
|
||||||
.sliders-icon {
|
.sliders-icon {
|
||||||
color: $curious-blue;
|
color: $curious-blue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user