MyCrypto/common/components/GasLimitField.tsx
William O'Beirne edda9f71ea Improved Gas UX (Pt. 1 - Gas Slider on Send) (#728)
* Initial crack at simple only gas slider component.

* Work on advanced component. Refactor redux and components to specify gas limit vs price.

* Convert fee summary to a render cbesque thing.

* Rework responsive columns.

* Remove force offline button.

* Tweak styles.

* Fix tscheck issues, remove unneeded prop.

* Fix references to GasField

* Gas slider in lite send.

* Make gas slider network-aware for symbol and price calculation.
2018-01-07 10:43:06 -06:00

22 lines
606 B
TypeScript

import React from 'react';
import { GasLimitFieldFactory } from './GasLimitFieldFactory';
import translate from 'translations';
import { Aux } from 'components/ui';
export const GasLimitField: React.SFC<{}> = () => (
<Aux>
<label>{translate('TRANS_gas')} </label>
<GasLimitFieldFactory
withProps={({ gasLimit: { raw, value }, onChange, readOnly }) => (
<input
className={`form-control ${!!value ? 'is-valid' : 'is-invalid'}`}
type="text"
readOnly={!!readOnly}
value={raw}
onChange={onChange}
/>
)}
/>
</Aux>
);