import { NAME, pattern, UI, type VNode } from "commonfabric"; // deno-lint-ignore no-empty-interface interface AutocompleteStoryInput {} export interface AutocompleteStoryOutput { [NAME]: string; [UI]: VNode; controls: VNode; } export default pattern(() => { const items = [ { value: "apple", label: "Apple", group: "Fruits" }, { value: "banana", label: "Banana", group: "Fruits" }, { value: "cherry", label: "Cherry", group: "Fruits" }, { value: "carrot", label: "Carrot", group: "Vegetables" }, { value: "broccoli", label: "Broccoli", group: "Vegetables" }, { value: "spinach", label: "Spinach", group: "Vegetables" }, ]; return { [NAME]: "cf-autocomplete Story", [UI]: (
Autocomplete with grouped items
), controls: (
No interactive controls. Type to search grouped items.
), }; });