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:
@@ -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++;
|
||||
|
||||
@@ -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 {}
|
||||
|
||||
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user