UNPKG

@spark-ui/dropdown

Version:

Displays a list of options for the user to pick from—triggered by a button. Differs from Select in that it offers multiple select and its list is not native.

9 lines (8 loc) • 345 B
import { UseMultipleSelectionReturnValue, type UseSelectReturnValue } from 'downshift'; export interface DropdownItem { disabled: boolean; value: string; text: string; } export type ItemsMap = Map<string, DropdownItem>; export type DownshiftState = UseSelectReturnValue<DropdownItem> & UseMultipleSelectionReturnValue<DropdownItem>;