mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-03-01 19:20:29 +00:00
27 lines
592 B
TypeScript
27 lines
592 B
TypeScript
|
import React, { Component } from 'react';
|
||
|
import Dropdown from './Dropdown';
|
||
|
|
||
|
interface Props {
|
||
|
value?: string;
|
||
|
options: string[];
|
||
|
ariaLabel?: string;
|
||
|
onChange(value: string): void;
|
||
|
}
|
||
|
|
||
|
export default class SimpleDropdown extends Component<Props, void> {
|
||
|
public render() {
|
||
|
const { options, value, onChange, ariaLabel } = this.props;
|
||
|
|
||
|
const StringDropdown = Dropdown as new () => Dropdown<string>;
|
||
|
|
||
|
return (
|
||
|
<StringDropdown
|
||
|
options={options}
|
||
|
value={value}
|
||
|
onChange={onChange}
|
||
|
ariaLabel={ariaLabel || "dropdown"}
|
||
|
/>
|
||
|
);
|
||
|
}
|
||
|
}
|