import React from 'react'; import { GasLimitFieldFactory } from './GasLimitFieldFactory'; import translate from 'translations'; import { CSSTransition } from 'react-transition-group'; import { Spinner } from 'components/ui'; import { gasLimitValidator } from 'libs/validators'; interface Props { includeLabel: boolean; onlyIncludeLoader: boolean; customLabel?: string; disabled?: boolean; } export const GaslimitLoading: React.SFC<{ gasEstimationPending: boolean; onlyIncludeLoader?: boolean; }> = ({ gasEstimationPending, onlyIncludeLoader }) => ( {onlyIncludeLoader ? 'Calculating gas limit' : 'Calculating'} ); export const GasLimitField: React.SFC = ({ includeLabel, onlyIncludeLoader, customLabel, disabled }) => ( ( {includeLabel ? ( customLabel ? ( {customLabel} ) : ( {translate('TRANS_gas')} ) ) : null} {onlyIncludeLoader ? null : ( )} )} /> );