mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-11 03:26:14 +00:00
8d27d0ba4d
* Change gas price validation to be string input based * Change sanitization to use Nunber * Have validators use Number over parseFloat * Fix css validation class * Add valid css to address field * Add data field validation * Remove unused import * Fix button being hidden on inputs * Dead code removal * Unify textarea and input class validation * Adjust validity styling to only apply after a value has been inputted * Do not pass custom props to DOM
26 lines
787 B
TypeScript
26 lines
787 B
TypeScript
import { DataFieldFactory } from './DataFieldFactory';
|
|
import React from 'react';
|
|
import translate from 'translations';
|
|
import { donationAddressMap } from 'config';
|
|
import { Input } from 'components/ui';
|
|
|
|
export const DataField: React.SFC<{}> = () => (
|
|
<DataFieldFactory
|
|
withProps={({ data: { raw }, validData, onChange, readOnly }) => (
|
|
<div className="input-group-wrapper">
|
|
<label className="input-group">
|
|
<div className="input-group-header">{translate('OFFLINE_STEP2_LABEL_6')}</div>
|
|
<Input
|
|
isValid={validData}
|
|
type="text"
|
|
placeholder={donationAddressMap.ETH}
|
|
value={raw}
|
|
readOnly={!!readOnly}
|
|
onChange={onChange}
|
|
/>
|
|
</label>
|
|
</div>
|
|
)}
|
|
/>
|
|
);
|