@ducor/react
Version:
admin template ui interface
28 lines (27 loc) • 1.16 kB
TypeScript
import React, { ReactNode } from "react";
type SIDEBAR_LOCATION = "top" | "buttom" | "left" | "right";
type SIDEBAR_POSITION = "fixed" | "static";
type SIDEBAR_TYPE = "full" | "compact" | "mini";
type SIDEBAR_SHOW = boolean;
type SIDEBAR_RESIZER_ISACTIVE = boolean;
type SIDEBAR_RESIZER_WIDTH = null | string;
export interface SidebarContextType {
sidebarLocation: SIDEBAR_LOCATION;
setSidebarLocation: (location: SIDEBAR_LOCATION) => void;
sidebarPosition: SIDEBAR_POSITION;
setSidebarPosition: (position: SIDEBAR_POSITION) => void;
sidebarType: SIDEBAR_TYPE;
setSidebarType: (type: SIDEBAR_TYPE) => void;
sidebarShow: SIDEBAR_SHOW;
setSidebarShow: (show: boolean) => void;
sidebarResizerIsActive: SIDEBAR_RESIZER_ISACTIVE;
setSidebarResizerIsActive: (isActive: boolean) => void;
sidebarResizerWidth: SIDEBAR_RESIZER_WIDTH;
setSidebarResizerWidth: (width: string | null) => void;
}
export declare const SidebarContext: React.Context<SidebarContextType | undefined>;
interface SidebarProviderProps {
children: ReactNode;
}
export declare const SidebarProvider: React.FC<SidebarProviderProps>;
export {};