1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

[CL-135] Migrate component library to standalone components (#12389)

* Migrate component library to standalone components

* Fix tests
This commit is contained in:
Oscar Hinton
2024-12-17 23:29:48 +01:00
committed by GitHub
parent ac13cf7ce6
commit 5a582dfc6f
101 changed files with 330 additions and 216 deletions

View File

@@ -13,6 +13,7 @@ let nextId = 0;
selector: "bit-toggle-group",
templateUrl: "./toggle-group.component.html",
preserveWhitespaces: false,
standalone: true,
})
export class ToggleGroupComponent<TValue = unknown> {
private id = nextId++;

View File

@@ -1,14 +1,10 @@
import { CommonModule } from "@angular/common";
import { NgModule } from "@angular/core";
import { BadgeModule } from "../badge";
import { ToggleGroupComponent } from "./toggle-group.component";
import { ToggleComponent } from "./toggle.component";
@NgModule({
imports: [CommonModule, BadgeModule],
imports: [ToggleGroupComponent, ToggleComponent],
exports: [ToggleGroupComponent, ToggleComponent],
declarations: [ToggleGroupComponent, ToggleComponent],
})
export class ToggleGroupModule {}

View File

@@ -1,5 +1,6 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { NgClass } from "@angular/common";
import {
AfterContentChecked,
AfterViewInit,
@@ -19,6 +20,8 @@ let nextId = 0;
selector: "bit-toggle",
templateUrl: "./toggle.component.html",
preserveWhitespaces: false,
standalone: true,
imports: [NgClass],
})
export class ToggleComponent<TValue> implements AfterContentChecked, AfterViewInit {
id = nextId++;