mirror of
https://github.com/Eugeny/tabby.git
synced 2025-10-04 22:14:55 +00:00
24 lines
555 B
TypeScript
24 lines
555 B
TypeScript
import { Injectable } from '@angular/core'
|
|
import { ToastrService } from 'ngx-toastr'
|
|
|
|
@Injectable({ providedIn: 'root' })
|
|
export class NotificationsService {
|
|
private constructor (
|
|
private toastr: ToastrService,
|
|
) { }
|
|
|
|
notice (text: string): void {
|
|
this.toastr.info(text, undefined, {
|
|
timeOut: 1000,
|
|
})
|
|
}
|
|
|
|
info (text: string, details?: string): void {
|
|
this.toastr.info(text, details)
|
|
}
|
|
|
|
error (text: string, details?: string): void {
|
|
this.toastr.error(text, details)
|
|
}
|
|
}
|