UNPKG

react-ui89

Version:

A collection of React components that mimic a common style of user interfaces from the late 80s and early 90s.

47 lines (46 loc) 1.27 kB
import React from "react"; import "./Ui89InputSelect.css"; import "../style/input-box.css"; import "../style/text.css"; export interface Ui89InputSelectProps<T> { /** * Available options. */ options?: T[]; /** * Option height. Options list uses a technique called DOM virtualization. */ optionHeight?: number; /** * The selected option. */ value?: T; /** * Display search input. * * Does not search automatically. You must filter the options yourself. */ search?: boolean; /** * Called whenever an option is selected. */ onChange?: (option: T) => void; /** * A search term was provided. */ onSearch?: (search: string) => void; /** * Retrieves the value that uniquely identifies the option. This is what is * used to determine which option is currently selected. */ getOptionKey?: (option: T) => any; /** * Customize how an option should be rendered. */ renderOption?: (option: T) => any; } /** * This is a very performant and customizable dropdown selector that * allows you to choose from a list of options. */ export declare function Ui89InputSelect<T>(props: Ui89InputSelectProps<T>): React.JSX.Element;