@create-figma-plugin/ui
Version:
Production-grade Preact components that replicate the Figma UI design
34 lines • 1.5 kB
TypeScript
import { ComponentChildren } from 'preact';
import { EventHandler } from '../../../types/event-handler.js';
export interface TextboxAutocompleteProps {
disabled?: boolean;
filter?: boolean;
icon?: ComponentChildren;
onChange?: EventHandler.onChange<HTMLInputElement>;
onInput?: EventHandler.onInput<HTMLInputElement>;
onKeyDown?: EventHandler.onKeyDown<HTMLInputElement>;
onMouseDown?: EventHandler.onMouseDown<HTMLInputElement>;
onPaste?: EventHandler.onPaste<HTMLInputElement>;
onValueInput?: EventHandler.onValueChange<string>;
options: Array<TextboxAutocompleteOption>;
placeholder?: string;
propagateEscapeKeyDown?: boolean;
revertOnEscapeKeyDown?: boolean;
spellCheck?: boolean;
strict?: boolean;
top?: boolean;
value: string;
}
export type TextboxAutocompleteOption = TextboxAutocompleteOptionHeader | TextboxAutocompleteOptionValue | TextboxAutocompleteOptionSeparator;
export type TextboxAutocompleteOptionHeader = {
header: string;
};
export type TextboxAutocompleteOptionValue = {
value: string;
disabled?: boolean;
};
export type TextboxAutocompleteOptionSeparator = '-';
export declare const TextboxAutocomplete: import("preact").FunctionalComponent<Omit<import("../../../utilities/create-component.js").MixinHTMLElementAttributes<HTMLInputElement, TextboxAutocompleteProps>, "ref"> & {
ref?: import("preact").Ref<HTMLInputElement> | undefined;
}>;
//# sourceMappingURL=textbox-autocomplete.d.ts.map