@ducor/react
Version:
admin template ui interface
35 lines (34 loc) • 1.18 kB
TypeScript
import React, { ReactNode } from "react";
interface DataState {
HTML_DIRECTION: "ltr" | "rtl";
LAYOUT_BOX: "full" | "box";
HEADER_LOCATION: "top" | "buttom" | "left" | "right";
HEADER_POSITION: "fixed" | "static";
SIDEBAR_LOCATION: "top" | "buttom" | "left" | "right";
SIDEBAR_POSITION: "fixed" | "static";
SIDEBAR_TYPE: "full" | "compact" | "mini";
SIDEBAR_SHOW: boolean;
SIDEBAR_RESIZER_ISACTIVE: boolean;
SIDEBAR_RESIZER_WIDTH: null | string;
BUILDER_MODE: boolean;
OVER_WRITE_LAYOUT: boolean;
}
interface AdminContextType {
adminData: DataState;
setAdminData: (key: string, value: string | number | boolean | null) => void;
setLayout: (layoutName: string) => void;
}
interface AdminProviderProps {
children?: ReactNode;
config?: Record<string, string | boolean | number>;
}
export declare const AdminContext: React.Context<AdminContextType | undefined>;
export declare const useAdmin: () => AdminContextType;
/**
* Current theme mode
*
* @returns
*/
export declare const useLayout: (name: string) => null;
export declare const AdminProvider: React.NamedExoticComponent<AdminProviderProps>;
export {};