drawer-stack
Version:
Drawer stack for React
26 lines (25 loc) • 597 B
TypeScript
export interface DrawerStackItem {
id: string;
path: string;
title?: string;
level: number;
}
export declare function useDrawerStack(): {
drawerStack: {
id: string;
path: string;
level: number;
}[];
hasDrawers: boolean;
currentDrawer: {
id: string;
path: string;
level: number;
};
pushDrawer: (path: string) => void;
popDrawer: () => void;
popDrawerInternal: () => void;
replaceDrawer: (path: string) => void;
closeAllDrawers: () => void;
replaceDrawerStack: (paths: string[]) => void;
};