svelte-ux
Version:
- Increment version in `package.json` and commit as `Version bump to x.y.z` - `npm run publish`
16 lines (15 loc) • 468 B
TypeScript
export type SelectionProps<T> = {
initial?: T[];
all?: T[];
single?: boolean;
};
export default function selectionStore<T>(props?: SelectionProps<T>): import("svelte/store").Readable<{
selected: T | T[];
toggleSelected: (value: T) => void;
isSelected: (value: T) => boolean;
toggleAll: () => void;
isAllSelected: () => boolean;
isAnySelected: () => boolean;
clear: () => void;
all: import("svelte/store").Writable<T[]>;
}>;