its-just-ui
Version:
ITS Just UI - The easiest and best React UI component library. Modern, accessible, and customizable components built with TypeScript and Tailwind CSS. Simple to use, production-ready components for building beautiful user interfaces with ease.
10 lines (8 loc) • 628 B
TypeScript
import { CascadeOption, CascadeValue, CascadeLevel } from './types';
export declare const useCascade: () => import('./types').CascadeContextValue;
export declare const useCascadeLevels: (options: CascadeOption[], maxLevels?: number) => CascadeLevel[];
export declare const useCascadeValue: (options: CascadeOption[]) => {
findValuePath: (targetValue: string | number, opts: CascadeOption[], path?: (string | number)[]) => (string | number)[] | null;
getValueFromPath: (path: (string | number)[]) => CascadeValue | null;
getOptionsForLevel: (level: number, selectedPath?: (string | number)[]) => CascadeOption[];
};