@wordpress/components
Version:
UI components for WordPress.
23 lines • 1.01 kB
TypeScript
/// <reference types="react" />
import type { AutocompleteProps, UseAutocompleteProps } from './types';
export declare function useAutocomplete({ record, onChange, onReplace, completers, contentRef, }: UseAutocompleteProps): {
listBoxId: string | undefined;
activeId: string | null;
onKeyDown: (event: KeyboardEvent) => void;
popover: false | JSX.Element | null;
};
export declare function useAutocompleteProps(options: UseAutocompleteProps): {
ref: (instance: HTMLElement | null) => void;
children?: undefined;
'aria-autocomplete'?: undefined;
'aria-owns'?: undefined;
'aria-activedescendant'?: undefined;
} | {
ref: (instance: HTMLElement | null) => void;
children: false | JSX.Element | null;
'aria-autocomplete': string | undefined;
'aria-owns': string | undefined;
'aria-activedescendant': string | null;
};
export default function Autocomplete({ children, isSelected, ...options }: AutocompleteProps): JSX.Element;
//# sourceMappingURL=index.d.ts.map