@toolpad/core
Version:
Dashboard framework powered by Material UI.
56 lines • 1.58 kB
TypeScript
import * as React from 'react';
import type { Navigation, NavigationPageItem } from '../AppProvider';
export interface DashboardSidebarPageItemProps {
/**
* Navigation page item definition.
*/
item: NavigationPageItem;
/**
* Link `href` for when the item is rendered as a link.
* @default getItemPath(navigationContext, item)
*/
href?: string;
/**
* The component used to render the item as a link.
* @default Link
*/
LinkComponent?: React.ElementType;
/**
* If `true`, expands any nested navigation in the item, otherwise collapse it.
* @default false
*/
expanded?: boolean;
/**
* Use to apply selected styling.
* @default false
*/
selected?: boolean;
/**
* If `true`, the item is disabled.
* @default false
*/
disabled?: boolean;
}
export interface DashboardSidebarPageItemContextProps extends Partial<DashboardSidebarPageItemProps> {
id: string;
onClick: (itemId: string, item: NavigationPageItem) => void;
isMini?: boolean;
isSidebarFullyExpanded?: boolean;
isSidebarFullyCollapsed?: boolean;
renderNestedNavigation: (subNavigation: Navigation) => React.ReactNode;
}
/**
*
* Demos:
*
* - [Dashboard Layout](https://mui.com/toolpad/core/react-dashboard-layout/)
*
* API:
*
* - [DashboardSidebarPageItem API](https://mui.com/toolpad/core/api/dashboard-sidebar-page-item)
*/
declare function DashboardSidebarPageItem(props: DashboardSidebarPageItemProps): React.JSX.Element;
declare namespace DashboardSidebarPageItem {
var propTypes: any;
}
export { DashboardSidebarPageItem };