@nexusui/components
Version:
These are custom components specially-developed for NexusUI applications. They will make your life easier by giving you out-of-the-box implementations for various high-level UI elements that you can drop directly into your application.
36 lines (35 loc) • 1.41 kB
TypeScript
import { TreeItemProps } from '@mui/x-tree-view';
import { SvgIconProps } from '@mui/material/SvgIcon';
import { IAssemblyTreeItemLabel } from './AssemblyTreeItemLabel.component';
export type IAssemblyTreeItem = Omit<TreeItemProps, 'children'> & {
/**
* An array of nested items that should appear under this node
*/
children?: ReadonlyArray<IAssemblyTreeItem>;
/**
* A custom react component that will be rendered at the end of the AssemblyTreeItem — used for custom actions, such as visibility toggle
*/
actions?: IAssemblyTreeItemLabel['actions'];
/**
* Callback function executed when the label of an editable node has been changed
* @param itemId the id of the node
* @param label the new label for the node
*/
onNodeChanged?: (itemId: string, label: string) => void;
/**
* True if you want the node label to be editable via double-click
*/
editable?: boolean;
/**
* Custom element to replace the default expand/collapse icon
*/
labelIcon?: React.ElementType<SvgIconProps>;
/**
* Whether the node should have visible styling. If false, the node will be rendered with disabled color text, which will also be inherited by any nested children.
* @default true
*/
visible?: boolean;
};
export declare const AssemblyTreeItem: React.FC<IAssemblyTreeItem & {
depth: number;
}>;