UNPKG

@etsoo/toolpad

Version:

Dashboard framework extention based on Toolpad Core

92 lines (91 loc) 2.6 kB
import * as React from "react"; import { type AccountProps } from "../Account"; import { SxProps, Theme } from "@mui/material/styles"; export interface SidebarFooterProps { mini: boolean; } export interface DashboardLayoutSlotProps { titlebar?: {}; toolbarActions?: {}; toolbarAccount?: AccountProps; sidebarFooter?: SidebarFooterProps; } export interface DashboardLayoutSlots { /** * The title bar component used in the layout header. * @default TitleBar */ titlebar?: React.JSXElementConstructor<{}>; /** * The toolbar actions component used in the layout header. * @default ToolbarActions */ toolbarActions?: React.JSXElementConstructor<{}>; /** * The toolbar account component used in the layout header. * @default Account */ toolbarAccount?: React.JSXElementConstructor<AccountProps>; /** * Optional footer component used in the layout sidebar. * @default null */ sidebarFooter?: React.JSXElementConstructor<SidebarFooterProps>; } export interface DashboardLayoutProps { /** * The content of the dashboard. */ children: React.ReactNode; /** * Whether the sidebar should not be collapsible to a mini variant in desktop and tablet viewports. * @default false */ disableCollapsibleSidebar?: boolean; /** * Whether the sidebar should start collapsed in desktop size screens. * @default false */ defaultSidebarCollapsed?: boolean; /** * Whether the navigation bar and menu icon should be hidden * @default false */ hideNavigation?: boolean; /** * Whether the theme switcher should be shown in the toolbar. * @default false */ showThemeSwitcher?: boolean; /** * Width of the sidebar when expanded. * @default 320 */ sidebarExpandedWidth?: number | string; /** * The components used for each slot inside. * @default {} */ slots?: DashboardLayoutSlots; /** * The props used for each slot inside. * @default {} */ slotProps?: DashboardLayoutSlotProps; /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx?: SxProps<Theme>; } /** * * Demos: * * - [Dashboard Layout](https://mui.com/toolpad/core/react-dashboard-layout/) * * API: * * - [DashboardLayout API](https://mui.com/toolpad/core/api/dashboard-layout) */ declare function DashboardLayout(props: DashboardLayoutProps): import("react/jsx-runtime").JSX.Element; export { DashboardLayout };