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

@@ -1,13 +1,10 @@
import { CommonModule } from "@angular/common";
import { ModuleWithProviders, NgModule } from "@angular/core";
import { DefaultNoComponentGlobalConfig, GlobalConfig, TOAST_CONFIG } from "ngx-toastr";
import { ToastComponent } from "./toast.component";
import { BitwardenToastrComponent } from "./toastr.component";
@NgModule({
imports: [CommonModule, ToastComponent],
declarations: [BitwardenToastrComponent],
imports: [BitwardenToastrComponent],
exports: [BitwardenToastrComponent],
})
export class ToastModule {

View File

@@ -2,6 +2,8 @@ import { animate, state, style, transition, trigger } from "@angular/animations"
import { Component } from "@angular/core";
import { Toast as BaseToastrComponent } from "ngx-toastr";
import { ToastComponent } from "./toast.component";
@Component({
template: `
<bit-toast
@@ -22,5 +24,7 @@ import { Toast as BaseToastrComponent } from "ngx-toastr";
]),
],
preserveWhitespaces: false,
standalone: true,
imports: [ToastComponent],
})
export class BitwardenToastrComponent extends BaseToastrComponent {}