1
0
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:
Bryan Cunningham
2025-11-06 11:10:17 -05:00
committed by GitHub
parent 29e4085986
commit f865139d16
6 changed files with 115 additions and 13 deletions

View File

@@ -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.
*