mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-02-20 14:58:24 +00:00
* Update account view routing * Temporarily add unicode character to translated strings for testing * Temporarily select add unicode to all untranslated strings * Format changes * Add all english translations for /account & /generate * Add the rest of the english translations * Add a few more missing translations * Update en translations * Get selectedLanguage from localstorage instead of redux sttate * Update snapshots * Add missing translation keys & Update translate functs & change variable prefix * translate all markdown strings & remove old translation strings * Update snapshot * Add a few more translation strs * Move raw strings being translated into json * All translation keys are now Uppercase * Fix up the last few translations * Update snapshot * Uppercase de translation strings * Bring back shapeshift logo on swap * Fix contracts tab translations * Fix a few more translations * Fix translations * remove debugging stuff * Update snapshots * Use react.fragment as markdown root renderer * Seperate markdown translations into their own function * Clean up translation functions * Clean up translation functions * Update snapshot * Fix some broken translation strings * Add prettier ignore file
38 lines
1.2 KiB
TypeScript
38 lines
1.2 KiB
TypeScript
import React from 'react';
|
|
import { GasLimitFieldFactory } from './GasLimitFieldFactory';
|
|
import translate from 'translations';
|
|
import { gasLimitValidator } from 'libs/validators';
|
|
import { InlineSpinner } from 'components/ui/InlineSpinner';
|
|
import './GasLimitField.scss';
|
|
import { Input } from 'components/ui';
|
|
|
|
interface Props {
|
|
customLabel?: string;
|
|
disabled?: boolean;
|
|
}
|
|
|
|
export const GasLimitField: React.SFC<Props> = ({ customLabel, disabled }) => (
|
|
<GasLimitFieldFactory
|
|
withProps={({ gasLimit: { raw }, onChange, readOnly, gasEstimationPending }) => (
|
|
<div className="input-group-wrapper AdvancedGas-gas-price">
|
|
<label className="input-group">
|
|
<div className="input-group-header">
|
|
{customLabel ? customLabel : translate('TRANS_GAS')}
|
|
<div className="flex-spacer" />
|
|
<InlineSpinner active={gasEstimationPending} text="Calculating" />
|
|
</div>
|
|
<Input
|
|
className={gasLimitValidator(raw) ? 'is-valid' : 'is-invalid'}
|
|
type="number"
|
|
placeholder="21000"
|
|
readOnly={!!readOnly}
|
|
value={raw}
|
|
onChange={onChange}
|
|
disabled={disabled}
|
|
/>
|
|
</label>
|
|
</div>
|
|
)}
|
|
/>
|
|
);
|