UNPKG

@wonderflow/react-components

Version:

UI components from Wonderflow's Wanda design system

38 lines 1.23 kB
import { ForwardRefExoticComponent, ReactNode } from 'react'; import { TextfieldProps } from '../..'; import { MenuProps } from '../menu'; import { AutocompleteOptionProps } from './autocomplete-option'; declare type ValueType = { query: string; value: string; }; export declare type AutocompleteProps = PropsWithClass<TextfieldProps<{ /** * The callback called when an option is picked from the list */ onChange?: (value: ValueType) => void; /** * Set the maximum height of the options list after which * it will scroll. */ maxHeight?: MenuProps['maxHeight']; /** * Custom empty content to display when there are no options or * when the value does not match any of the options. */ emptyContent?: ReactNode; /** * Show skeletons while loading options. */ busy?: boolean; /** * Set the root element to render the Autocomplete into. */ root?: HTMLElement; }>>; declare type AutocompleteComponent = ForwardRefExoticComponent<AutocompleteProps> & { Option: ForwardRefExoticComponent<AutocompleteOptionProps>; }; export declare const Autocomplete: AutocompleteComponent; export {}; //# sourceMappingURL=autocomplete.d.ts.map