UNPKG

@mui/x-tree-view

Version:

The community edition of the MUI X Tree View components.

40 lines 1.08 kB
import * as React from 'react'; import { SlotComponentProps } from '@mui/utils/types'; import { UseTreeItemStatus } from "../useTreeItem/index.js"; export interface TreeItemIconSlots { /** * The icon used to collapse the item. */ collapseIcon?: React.ElementType | null; /** * The icon used to expand the item. */ expandIcon?: React.ElementType | null; /** * The icon displayed next to an end item. */ endIcon?: React.ElementType | null; /** * The icon to display next to the Tree Item's label. */ icon?: React.ElementType | null; } export interface TreeItemIconSlotProps { collapseIcon?: SlotComponentProps<'svg', {}, {}>; expandIcon?: SlotComponentProps<'svg', {}, {}>; endIcon?: SlotComponentProps<'svg', {}, {}>; icon?: SlotComponentProps<'svg', {}, {}>; } export interface TreeItemIconProps { status: UseTreeItemStatus; /** * Overridable component slots. * @default {} */ slots?: TreeItemIconSlots; /** * The props used for each component slot. * @default {} */ slotProps?: TreeItemIconSlotProps; }