PWA Fundvelo der Caritas.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

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. }