matchMenuElement()function
matchMenuElement(element: Element): boolean
| Param | Type | |
|---|---|---|
element | Element | The element to test. required |
.type | string((props: P) => Elementsnull) | required readonly |
.props | P | required readonly |
.key | stringnull | required readonly |
.$$typeof | symbol | readonly |
| Return | |
|---|---|
boolean | true when the element should appear in the menu, false otherwise. |
Match an element that should appear in the sidebar menu.
- Generic tree elements (directories and files) always qualify.
- For documentation elements, only
kind: "module"qualifies — functions, classes, methods, properties, etc. are kept off the navigation.
Examples
matchMenuElement(element) // true