@mui/x-tree-view
Version:
The community edition of the MUI X Tree View components.
22 lines • 1.44 kB
TypeScript
import * as React from 'react';
import { TreeItemWrapper, TreeRootWrapper, TreeViewAnyPluginSignature, TreeViewInstance, TreeViewItemPluginResponse, TreeViewPublicAPI, TreeViewReadonlyStore } from "../models/index.js";
import type { TreeItemProps } from "../../TreeItem/TreeItem.types.js";
import { TreeViewClasses, TreeViewSlotProps, TreeViewSlots } from "./TreeViewStyleContext.js";
import { TreeViewCorePluginSignatures } from "../corePlugins/index.js";
export type TreeViewItemPluginsRunner = (props: TreeItemProps) => Required<TreeViewItemPluginResponse>;
export interface TreeViewContextValue<TSignatures extends readonly TreeViewAnyPluginSignature[], TOptionalSignatures extends readonly TreeViewAnyPluginSignature[] = []> {
instance: TreeViewInstance<TSignatures, TOptionalSignatures>;
publicAPI: TreeViewPublicAPI<TSignatures, TOptionalSignatures>;
store: TreeViewReadonlyStore<readonly [...TreeViewCorePluginSignatures, ...TSignatures]>;
rootRef: React.RefObject<HTMLUListElement | null>;
wrapItem: TreeItemWrapper<TSignatures>;
wrapRoot: TreeRootWrapper;
runItemPlugins: TreeViewItemPluginsRunner;
}
export interface TreeViewProviderProps<TSignatures extends readonly TreeViewAnyPluginSignature[]> {
contextValue: TreeViewContextValue<TSignatures>;
children: React.ReactNode;
classes: Partial<TreeViewClasses> | undefined;
slots: TreeViewSlots | undefined;
slotProps: TreeViewSlotProps | undefined;
}