PWA Fundvelo der Caritas.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Toaster.cs 790B

12345678910111213141516171819202122232425262728
  1. using MatBlazor;
  2. namespace cwebplusApp.Shared.Services {
  3. public class Toaster {
  4. private readonly IMatToaster matToaster;
  5. public Toaster(IMatToaster toaster) {
  6. this.matToaster = toaster;
  7. }
  8. public void ShowInfo(string title, string message, string icon = "") {
  9. matToaster.Add(message, MatBlazor.MatToastType.Info, title, icon);
  10. }
  11. public void ShowWarning(string title, string message, string icon = "") {
  12. matToaster.Add(message, MatBlazor.MatToastType.Warning, title, icon);
  13. }
  14. public void ShowError(string title, string message, string icon = "") {
  15. matToaster.Add(message, MatBlazor.MatToastType.Danger, title, icon);
  16. }
  17. }
  18. }