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.

18 lines (17 loc) • 627 B
import React, { type PropsWithChildren } from 'react'; import { DropdownItem } from './types'; type ItemTextId = string | undefined; interface DropdownItemContextState { textId: ItemTextId; setTextId: React.Dispatch<React.SetStateAction<ItemTextId>>; isSelected: boolean; itemData: DropdownItem; index: number; disabled: boolean; } export declare const DropdownItemProvider: ({ value, disabled, children, }: React.PropsWithChildren<{ value: string; disabled?: boolean | undefined; }>) => React.JSX.Element; export declare const useDropdownItemContext: () => DropdownItemContextState; export {};