Customization of Toasts without using generic component #263
ayushwritescode
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Use case: I want to customize all my error toasts to include an icon button to report and capture bugs automatically throughout my app without having to change all the references of ToastService.ShowError() calls.
Expectations. Probably a method to change the default behavior of the Error Toast to the ToastService injection in App.razor or in services.AddBlazoredToast();
Something like this:
services.AddBlazoredToast(config =>
{
config.ErrorClass = "blazored-toast-error"; // Optional: Customize CSS class
config.ErrorIcon = "fas fa-exclamation-circle"; // Optional: Customize icon
config.ErrorComponent = typeof(MyCustomErrorToast); // Use your custom component
});
Beta Was this translation helpful? Give feedback.
All reactions