mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 01:33:33 +00:00
[CL-135] Migrate component library to standalone components (#12389)
* Migrate component library to standalone components * Fix tests
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
// @ts-strict-ignore
|
||||
import { FocusableOption } from "@angular/cdk/a11y";
|
||||
import { AfterViewInit, Component, HostListener, Input, OnDestroy, ViewChild } from "@angular/core";
|
||||
import { IsActiveMatchOptions, RouterLinkActive } from "@angular/router";
|
||||
import { IsActiveMatchOptions, RouterLinkActive, RouterModule } from "@angular/router";
|
||||
import { Subject, takeUntil } from "rxjs";
|
||||
|
||||
import { TabListItemDirective } from "../shared/tab-list-item.directive";
|
||||
@@ -12,6 +12,8 @@ import { TabNavBarComponent } from "./tab-nav-bar.component";
|
||||
@Component({
|
||||
selector: "bit-tab-link",
|
||||
templateUrl: "tab-link.component.html",
|
||||
standalone: true,
|
||||
imports: [TabListItemDirective, RouterModule],
|
||||
})
|
||||
export class TabLinkComponent implements FocusableOption, AfterViewInit, OnDestroy {
|
||||
private destroy$ = new Subject<void>();
|
||||
|
||||
@@ -10,6 +10,9 @@ import {
|
||||
QueryList,
|
||||
} from "@angular/core";
|
||||
|
||||
import { TabHeaderComponent } from "../shared/tab-header.component";
|
||||
import { TabListContainerDirective } from "../shared/tab-list-container.directive";
|
||||
|
||||
import { TabLinkComponent } from "./tab-link.component";
|
||||
|
||||
@Component({
|
||||
@@ -18,6 +21,8 @@ import { TabLinkComponent } from "./tab-link.component";
|
||||
host: {
|
||||
class: "tw-block",
|
||||
},
|
||||
standalone: true,
|
||||
imports: [TabHeaderComponent, TabListContainerDirective],
|
||||
})
|
||||
export class TabNavBarComponent implements AfterContentInit {
|
||||
@ContentChildren(forwardRef(() => TabLinkComponent)) tabLabels: QueryList<TabLinkComponent>;
|
||||
|
||||
Reference in New Issue
Block a user