mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
15 lines
405 B
TypeScript
15 lines
405 B
TypeScript
|
import { Injectable } from '@angular/core';
|
||
|
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
|
||
|
|
||
|
@Injectable({
|
||
|
providedIn: 'root',
|
||
|
})
|
||
|
export class ToastService {
|
||
|
constructor(private _snackBar: MatSnackBar) {}
|
||
|
|
||
|
public display(message: string, action?: string): void {
|
||
|
const config: MatSnackBarConfig = { duration: 2000 };
|
||
|
this._snackBar.open(message, action, config);
|
||
|
}
|
||
|
}
|