import { Story, ArgsTable, Canvas, Meta } from "@storybook/blocks"; import * as stories from "./tree-menu.stories.js"; import TreeMenu from "./"; import TreeNode from "./sub-components/tree-node.js"; # TreeMenu Tree menu description ### Usage ```js import TreeMenu from "@docspace/components/tree-menu"; ``` ```jsx ``` ### Properties TreeNode | Props | Type | Required | Values | Default | Description | | ----------------- | :----------------: | :------: | :----: | :-----: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `checkable` | `bool` | - | - | - | control node checkable if Tree is checkable | | `className` | `string` | - | - | - | additional class to treeNode | | `disableCheckbox` | `bool` | - | - | `false` | whether disable the treeNode' checkbox | | `disabled` | `bool` | - | - | `false` | whether disabled the treeNode | | `icon` | `element`,`func` | - | - | `false` | customize icon. When you pass component, whose render will receive full TreeNode props as component props | | `isLeaf` | `bool` | - | - | `false` | whether it's leaf node | | `key` | `bool` | - | - | - | it's used with tree props's (default)ExpandedKeys / (default)CheckedKeys / (default)SelectedKeys. you'd better to set it, and it must be unique in the tree's all treeNodes | | `style` | `object` | - | - | - | set style to treeNode | | `title` | `string`,`element` | - | - | - | tree/subTree's title | | `newItems` | `number` | - | - | - | The number of new elements in the node | | `onBadgeClick` | `func` | - | - | - | call when click on badge | | `showBadge` | `bool` | - | - | - | to display the badge |