mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
[CL-881] restore nav tree view (#17210)
* restore tree nav view * address Claude feedback * address feedback and fix depth calculation * address feedback from Claude * do not reserve space for icon
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Directive, EventEmitter, Output, input } from "@angular/core";
|
||||
import { Directive, EventEmitter, Output, input, model } from "@angular/core";
|
||||
import { RouterLink, RouterLinkActive } from "@angular/router";
|
||||
|
||||
/**
|
||||
@@ -21,6 +21,16 @@ export abstract class NavBaseComponent {
|
||||
*/
|
||||
readonly icon = input<string>();
|
||||
|
||||
/**
|
||||
* If this item is used within a tree, set `variant` to `"tree"`
|
||||
*/
|
||||
readonly variant = input<"default" | "tree">("default");
|
||||
|
||||
/**
|
||||
* Depth level when nested inside of a `'tree'` variant
|
||||
*/
|
||||
readonly treeDepth = model(0);
|
||||
|
||||
/**
|
||||
* Optional route to be passed to internal `routerLink`. If not provided, the nav component will render as a button.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user