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