UNPKG

@payfit/unity-components

Version:

37 lines (36 loc) 1.46 kB
import { VariantProps } from '@payfit/unity-themes'; import { ListBoxItemProps } from 'react-aria-components/ListBox'; export declare const autocompleteItem: import('tailwind-variants').TVReturnType<{ isDisabled: { false: string; true: string; }; }, undefined, string[], { isDisabled: { false: string; true: string; }; }, undefined, import('tailwind-variants').TVReturnType<{ isDisabled: { false: string; true: string; }; }, undefined, string[], unknown, unknown, undefined>>; export interface AutocompleteItemProps extends VariantProps<typeof autocompleteItem>, Omit<ListBoxItemProps, 'className' | 'style' | 'routerOptions' | 'referrerPolicy' | 'ping' | 'target' | 'hrefLang' | 'download' | 'ref' | 'rel' | 'aria-label'> { } /** * The `AutocompleteItem` component is used within the Autocomplete component to render individual items in the autocomplete results list. * It provides styling and accessibility features for autocomplete result items. * @example * ```tsx * <Autocomplete name="fruits" items={fruits}> * {item => ( * <AutocompleteItem id={item.id} textValue={item.name} isDisabled={item.disabled}> * {item.name} * </AutocompleteItem> * )} * </Autocomplete> * ``` */ declare const AutocompleteItem: import('react').ForwardRefExoticComponent<AutocompleteItemProps & import('react').RefAttributes<HTMLDivElement>>; export { AutocompleteItem };