1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 22:33:35 +00:00
Files
browser/libs/components/src/toast/toast-container.component.ts

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;
}
}