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.

123456789101112131415161718192021222324252627282930
  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 ShowSuccess(string title, string message, string icon = "") {
  9. matToaster.Add(message, MatBlazor.MatToastType.Success, title, icon);
  10. }
  11. public void ShowInfo(string title, string message, string icon = "") {
  12. matToaster.Add(message, MatBlazor.MatToastType.Info, title, icon);
  13. }
  14. public void ShowWarning(string title, string message, string icon = "") {
  15. matToaster.Add(message, MatBlazor.MatToastType.Warning, title, icon);
  16. }
  17. public void ShowError(string title, string message, string icon = "") {
  18. matToaster.Add(message, MatBlazor.MatToastType.Danger, title, icon);
  19. }
  20. }
  21. }