react-ui89
Version:
A collection of React components that mimic a common style of user interfaces from the late 80s and early 90s.
37 lines (36 loc) • 1.03 kB
TypeScript
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;
/**
* Called whenever an option is selected.
*/
onChange?: (option: T) => 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;