mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
adding @jsdoc comments to SidebarItem
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
parent
5b9e788730
commit
0cc2fb4cd8
@ -10,14 +10,23 @@ import { sidebarStorage } from "./sidebar-storage";
|
|||||||
import { isActiveRoute } from "../../navigation";
|
import { isActiveRoute } from "../../navigation";
|
||||||
|
|
||||||
interface SidebarItemProps {
|
interface SidebarItemProps {
|
||||||
id: string; // unique id, used in storage and integration tests
|
/**
|
||||||
|
* Unique id, used in storage and integration tests
|
||||||
|
*/
|
||||||
|
id: string;
|
||||||
url: string;
|
url: string;
|
||||||
className?: string;
|
className?: string;
|
||||||
text: React.ReactNode;
|
text: React.ReactNode;
|
||||||
icon?: React.ReactNode;
|
icon?: React.ReactNode;
|
||||||
isHidden?: boolean;
|
isHidden?: boolean;
|
||||||
isActive?: boolean; // marks a link, by default checks `props.url` to identify active state
|
/**
|
||||||
subMenus?: React.ReactNode | React.ComponentType<SidebarItemProps>[]; // props.children could be used too
|
* Forces this item to be also show as active or not.
|
||||||
|
*
|
||||||
|
* Default: dynamically checks the location against the `url` props to determine if
|
||||||
|
* this item should be shown as active
|
||||||
|
*/
|
||||||
|
isActive?: boolean;
|
||||||
|
subMenus?: React.ReactNode | React.ComponentType<SidebarItemProps>[];
|
||||||
}
|
}
|
||||||
|
|
||||||
@observer
|
@observer
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user