131.1. Notification types (#16)

This commit is contained in:
Art
2021-09-17 15:31:59 +03:00
parent 279e7178ee
commit f3156a634a
2 changed files with 9 additions and 1 deletions

View File

@ -0,0 +1,7 @@
export enum NotificationType {
DEFAULT = 'default',
INFO = 'info',
SUCCESS = 'success',
WARNING = 'warning',
ERROR = 'error'
}

View File

@ -1,5 +1,6 @@
import {Injectable} from '@angular/core';
import {NotifierService} from "angular-notifier";
import {NotificationType} from "../notification/notification-type";
@Injectable({
providedIn: 'root'
@ -9,7 +10,7 @@ export class NotificationService {
constructor(private notifier: NotifierService) {
}
public notify(type: string, message: string): void {
public notify(type: NotificationType, message: string): void {
this.notifier.notify(type, message);
}