| 12345678910111213141516171819202122232425262728 |
- using MatBlazor;
-
- namespace cwebplusApp.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);
-
- }
- }
-
- }
|