mui-component
Version:
some custom mui components
74 lines (73 loc) • 2.47 kB
TypeScript
import React from "react";
import type { InternalStandardProps as StandardProps, Theme, SxProps } from "@mui/material";
import type { TransitionProps } from "@mui/material/transitions";
import type { TreeItemContentProps } from "./TreeItemContent";
import type { TreeItemClasses } from "./treeItemClasses";
export declare const TreeItem: React.ForwardRefExoticComponent<Omit<TreeItemProps, "ref"> & React.RefAttributes<unknown>>;
export interface TreeItemProps extends React.PropsWithChildren<StandardProps<React.HTMLAttributes<HTMLLIElement>, "onFocus">> {
/**
* The content of the component.
*/
children?: React.ReactNode;
/**
* Override or extend the styles applied to the component.
*/
classes?: Partial<TreeItemClasses>;
/**
* The icon used to collapse the node.
*/
collapseIcon?: React.ReactNode;
/**
* The component used for the content node.
* @default TreeItemContent
*/
ContentComponent?: React.JSXElementConstructor<TreeItemContentProps>;
/**
* Props applied to ContentComponent
*/
ContentProps?: React.HTMLAttributes<HTMLElement>;
/**
* If `true`, the node is disabled.
*/
disabled?: boolean;
/**
* The icon displayed next to a end node.
*/
endIcon?: React.ReactNode;
/**
* The icon used to expand the node.
*/
expandIcon?: React.ReactNode;
/**
* The icon to display next to the tree node's label.
*/
icon?: React.ReactNode;
/**
* This prop isn't supported.
* Use the `onNodeFocus` callback on the tree if you need to monitor a node's focus.
*/
onFocus?: null;
/**
* The tree node label.
*/
label?: React.ReactNode;
/**
* The id of the node.
*/
nodeId: string;
/**
* The component used for the transition.
* [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
* @default Collapse
*/
TransitionComponent?: React.JSXElementConstructor<TransitionProps>;
/**
* Props applied to the transition element.
* By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition/) component.
*/
TransitionProps?: TransitionProps;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme>;
}