Skip to content
Snippets Groups Projects
Commit efc52408 authored by Marlène SIMONDANT's avatar Marlène SIMONDANT
Browse files

add a removeToast function

parent f39dd464
No related branches found
No related tags found
1 merge request!949change(profile): prevent rdv choice if user has no personal offer
Pipeline #116873 passed
......@@ -24,13 +24,19 @@ export class NotificationService {
/**
* By default, the error is displayed until clicked on.
*/
public showError(title: string, message = '', timeOut = 0): ActiveToast<unknown> {
public showError(title: string, message = '', timeOut = 0, options?: any): ActiveToast<unknown> {
return this.toastr.error(message, title, {
timeOut: timeOut,
disableTimeOut: timeOut === 0,
enableHtml: true,
...options,
});
}
public removeToast(toastId: number): void {
this.toastr.remove(toastId);
}
public showInfo(title: string, message = '', timeOut = 10000): ActiveToast<unknown> {
return this.toastr.info(message, title, {
timeOut: timeOut,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment