mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
[CL-335][CL-336][CL-374] Announce toasts more consistently (#13167)
This commit is contained in:
19
libs/components/src/toast/toast-container.component.ts
Normal file
19
libs/components/src/toast/toast-container.component.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Component, OnInit, ViewChild } from "@angular/core";
|
||||
import { ToastContainerDirective, ToastrService } from "ngx-toastr";
|
||||
|
||||
@Component({
|
||||
selector: "bit-toast-container",
|
||||
templateUrl: "toast-container.component.html",
|
||||
standalone: true,
|
||||
imports: [ToastContainerDirective],
|
||||
})
|
||||
export class ToastContainerComponent implements OnInit {
|
||||
@ViewChild(ToastContainerDirective, { static: true })
|
||||
toastContainer?: ToastContainerDirective;
|
||||
|
||||
constructor(private toastrService: ToastrService) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.toastrService.overlayContainer = this.toastContainer;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user