UNPKG

@zag-js/listbox

Version:

Core logic for the listbox widget implemented as a state machine

22 lines (21 loc) 463 B
// src/listbox.collection.ts import { GridCollection, ListCollection } from "@zag-js/collection"; var collection = (options) => { return new ListCollection(options); }; collection.empty = () => { return new ListCollection({ items: [] }); }; var gridCollection = (options) => { return new GridCollection(options); }; gridCollection.empty = () => { return new GridCollection({ items: [], columnCount: 0 }); }; export { collection, gridCollection };