mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 22:33:35 +00:00
20 lines
594 B
TypeScript
20 lines
594 B
TypeScript
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;
|
|
}
|
|
}
|