mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-10 02:55:41 +00:00
d1a2c885a2
* PureComponent a ton of non-connected components. * Debounce gas price slider. Keep gas price in state to reflect changes immediately. * PureComponent balance sidebar and swap unconnected components. * Import correct component. * Move debouncing of gas slider to sagas via gasPriceInputIntent action. * Remove console log. * Remove leftover file from merge.
28 lines
624 B
TypeScript
28 lines
624 B
TypeScript
import React, { PureComponent } from 'react';
|
|
|
|
interface Props {
|
|
value?: string;
|
|
options: string[];
|
|
onChange(event: React.FormEvent<HTMLSpanElement>): void;
|
|
}
|
|
|
|
export default class SimpleSelect extends PureComponent<Props, {}> {
|
|
public render() {
|
|
return (
|
|
<select
|
|
value={this.props.value || this.props.options[0]}
|
|
className={'form-control'}
|
|
onChange={this.props.onChange}
|
|
>
|
|
{this.props.options.map((obj, i) => {
|
|
return (
|
|
<option value={obj} key={i}>
|
|
{obj}
|
|
</option>
|
|
);
|
|
})}
|
|
</select>
|
|
);
|
|
}
|
|
}
|