import type { FC } from "react"; import type { MenuListProps } from "../MenuList"; /** * Properties for the `ListBox` component. This is a component that allows the * selection of an item or items from a list. */ export type ListBoxProps = Omit & { /** * Whether to allow the selection of multiple items. */ multiple?: boolean; /** * Properties for each item in the list box. */ items: ListBoxItem[]; /** * The current selection. Matches the 'value' property on the ListBoxItem. * If 'multiple' is true this is required to be an array. */ value: unknown; /** * A callback to fire when selected values change. */ onChange: (values: unknown) => void; }; /** * Properties used to create items in the listbox. */ export interface ListBoxItem { /** * A label for the item. */ label: string; /** * The value of this item. */ value: unknown; /** * Whether the item is currently enabled. */ enabled?: boolean; /** * A tooltip for the item. */ tooltip?: string; } declare const ListBox: FC; export default ListBox;