mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-10 11:05:47 +00:00
9ef1920fe0
* Align footer to bottom * Fix request payment offset padding * Update request payment padding * Add new Input and Dropdown components * Fix offset margins in equiv vals * Update all send tx inputs & dropdowns * Update generate wallet dropdowns * Update inputs & dropdowns for contracts tab * Add inputs & dropdowns for all but swap tab * amend * Fix imports * inputs are invalid when not disabled or readonly * Fix offset refresh button * Add togglable password back to wallet generation * Update swap inputs, textareas, and dropdowns * Update any outstanding inputs * Make UnitDropDown searchable * unitdropdown searchanble if options > 10 * Fix css issues * Reset before setting currentTo
31 lines
940 B
TypeScript
31 lines
940 B
TypeScript
import React from 'react';
|
|
import { AddressFieldFactory } from './AddressFieldFactory';
|
|
import { donationAddressMap } from 'config';
|
|
import translate from 'translations';
|
|
import { Input } from 'components/ui';
|
|
|
|
interface Props {
|
|
isReadOnly?: boolean;
|
|
}
|
|
|
|
export const AddressField: React.SFC<Props> = ({ isReadOnly }) => (
|
|
<AddressFieldFactory
|
|
withProps={({ currentTo, isValid, onChange, readOnly }) => (
|
|
<div className="input-group-wrapper">
|
|
<label className="input-group">
|
|
<div className="input-group-header">{translate('SEND_addr')}</div>
|
|
<Input
|
|
className={`input-group-input ${isValid ? '' : 'invalid'}`}
|
|
type="text"
|
|
value={currentTo.raw}
|
|
placeholder={donationAddressMap.ETH}
|
|
readOnly={!!(isReadOnly || readOnly)}
|
|
spellCheck={false}
|
|
onChange={onChange}
|
|
/>
|
|
</label>
|
|
</div>
|
|
)}
|
|
/>
|
|
);
|