1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 00:03:56 +00:00

[CL] add hideIfEmpty input to bit-nav-group (#12046)

This commit is contained in:
Thomas Rittson
2024-11-21 04:06:07 +10:00
committed by GitHub
parent 234a832fc4
commit 365c7dd65e
3 changed files with 81 additions and 48 deletions

View File

@@ -1,5 +1,6 @@
import {
AfterContentInit,
booleanAttribute,
Component,
ContentChildren,
EventEmitter,
@@ -40,6 +41,12 @@ export class NavGroupComponent extends NavBaseComponent implements AfterContentI
@Input()
open = false;
/**
* Automatically hide the nav group if there are no child buttons
*/
@Input({ transform: booleanAttribute })
hideIfEmpty = false;
@Output()
openChange = new EventEmitter<boolean>();