| 123456789101112131415161718192021222324252627282930 |
- using MatBlazor;
-
- namespace cwebplusApp.Shared.Services {
- public class Toaster {
-
- private readonly IMatToaster matToaster;
-
- public Toaster(IMatToaster toaster) {
- this.matToaster = toaster;
- }
-
- public void ShowSuccess(string title, string message, string icon = "") {
- matToaster.Add(message, MatBlazor.MatToastType.Success, title, icon);
- }
-
- 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);
- }
- }
-
- }
|