@cmk/fe_utils
Version:
frontend utility library
41 lines (39 loc) • 1.48 kB
TypeScript
import { TreeItemProps } from '@mui/x-tree-view';
import { ReactNode, Ref } from 'react';
import { AdditionalActionType } from './CTreeView';
export type StyledTreeItemProps = Omit<TreeItemProps, 'nodeId' | 'itemId' | 'children'> & {
bgColor?: string;
bgColorForDarkMode?: string;
color?: string;
colorForDarkMode?: string;
labelIcon?: ReactNode;
labelInfo?: string;
disableBorderLeft?: boolean;
disableAddAction?: boolean;
disableDeleteAction?: boolean;
onDelete?: (id: string) => void;
onAddChild?: (id: string) => void;
idFieldName?: string;
children?: StyledTreeItemProps[];
actions?: AdditionalActionType[] | ((item: any) => AdditionalActionType[]);
additionalActions?: AdditionalActionType[] | ((item: any) => AdditionalActionType[]);
useDraggable?: boolean;
toggleExpand?: (id: string, e: any) => void;
expandAllChildren?: (id: string) => void;
collapseAllChildren?: (id: string) => void;
isNotDroppable?: boolean;
onChangeDraggingActive?: (active: boolean) => void;
disableExpandMargin?: boolean;
nodeId?: number | string;
_parentId?: string | null;
labelText?: string;
};
export declare const StyledTreeItem: (props: StyledTreeItemProps & {
state: unknown;
formGen: unknown;
schema: unknown;
component: unknown;
ref?: Ref<HTMLUListElement>;
itemId?: string;
toggleSelect?: (id: string) => void;
}) => import("react/jsx-runtime").JSX.Element;