| 1234567891011121314151617181920212223242526272829303132 |
- using MatBlazor;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Threading.Tasks;
-
- namespace CaritasPWA.Shared.Services {
- public class Toaster {
-
- private readonly IMatToaster matToaster;
-
- public Toaster(IMatToaster toaster) {
- this.matToaster = toaster;
- }
-
- public void ShowInfo(string title, string message, string icon = "") {
- matToaster.Add(message, MatBlazor.MatToastType.Info, title, icon);
- }
-
-
- public void ShowWarning(string title, string message, string icon = "") {
- matToaster.Add(message, MatBlazor.MatToastType.Warning, title, icon);
-
- }
-
- public void ShowError(string title, string message, string icon = "") {
- matToaster.Add(message, MatBlazor.MatToastType.Danger, title, icon);
-
- }
- }
-
- }
|