1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 16:53:34 +00:00
Files
browser/libs/components/src/navigation/nav-logo.component.ts
2025-10-21 18:52:40 +02:00

35 lines
1.2 KiB
TypeScript

import { CommonModule } from "@angular/common";
import { Component, input } from "@angular/core";
import { RouterLinkActive, RouterLink } from "@angular/router";
import { BitwardenShield, Icon } from "@bitwarden/assets/svg";
import { BitIconComponent } from "../icon/icon.component";
import { SideNavService } from "./side-nav.service";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({
selector: "bit-nav-logo",
templateUrl: "./nav-logo.component.html",
imports: [CommonModule, RouterLinkActive, RouterLink, BitIconComponent],
})
export class NavLogoComponent {
/** Icon that is displayed when the side nav is closed */
readonly closedIcon = input(BitwardenShield);
/** Icon that is displayed when the side nav is open */
readonly openIcon = input.required<Icon>();
/**
* Route to be passed to internal `routerLink`
*/
readonly route = input.required<string | any[]>();
/** Passed to `attr.aria-label` and `attr.title` */
readonly label = input.required<string>();
constructor(protected sideNavService: SideNavService) {}
}