You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ombi/src/Ombi/ClientApp/src/app/services/notification.service.ts

29 lines
719 B

import { Injectable } from "@angular/core";
import { MatSnackBar, MatSnackBarConfig } from "@angular/material/snack-bar";
@Injectable()
export class NotificationService {
constructor(private snackbar: MatSnackBar) { }
private config: MatSnackBarConfig<any> = {
duration:3000,
}
public success(body: string) {
this.snackbar.open(body, "OK", this.config);
}
public info(title: string, body: string) {
this.snackbar.open(body, "OK", this.config);
}
public warning(title: string, body: string) {
this.snackbar.open(body, "OK", this.config);
}
public error(body: string) {
this.snackbar.open(body, "OK", this.config);
}
}