PWA Fundvelo der Caritas.
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

Toaster.cs 890B

1234567891011121314151617181920212223242526272829303132
  1. using MatBlazor;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Threading.Tasks;
  6. namespace CaritasPWA.Shared.Services {
  7. public class Toaster {
  8. private readonly IMatToaster matToaster;
  9. public Toaster(IMatToaster toaster) {
  10. this.matToaster = toaster;
  11. }
  12. public void ShowInfo(string title, string message, string icon = "") {
  13. matToaster.Add(message, MatBlazor.MatToastType.Info, title, icon);
  14. }
  15. public void ShowWarning(string title, string message, string icon = "") {
  16. matToaster.Add(message, MatBlazor.MatToastType.Warning, title, icon);
  17. }
  18. public void ShowError(string title, string message, string icon = "") {
  19. matToaster.Add(message, MatBlazor.MatToastType.Danger, title, icon);
  20. }
  21. }
  22. }