-
-
Notifications
You must be signed in to change notification settings - Fork 100
Open
Description
Describe the bug
It appears the regular Toast (with title and helptext) does not apply the color classes to the toast.
The SimpleToast however does pop up perfectly with a red background when set to danger.
To Reproduce
Steps to reproduce the behavior:
- Setup a ToastComponent
- Trigger a
ToastService.Notify(new(ToastType.Danger, "SimpleToast Danger Color" )) - Trigger a
ToastService.Notify(new(ToastType.Danger, "", "Toast", "HelpText", "regular 'Toast' Danger Color", false )) - Notice the color is not applied to the second toast.
Expected behavior
Both toast types to be styled to match the ToastType.
Versions (please complete the following information):
- .NET Version: .NET 10
- BlazorBootstrap: 3.5.0
- Blazor WebAssembly / Server: Server
- Blazor Interactive Render Mode: interactiveserver for Toast component
- Blazor Interactivity Location: page/component
Sample code
InvokeAsync(() => ToastService.Notify(new(ToastType.Success, "", "Toast", "HelpText", "Can't read this", false )));
Additional context
Little deeper dive reveals that in the simple toast we find this for the class assignment which looks correct:
On line 20:
protected override string? ClassNames => BlazorBootstrapComponentBase.BuildClassNames(base.Class, ("toast", true), (ToastMessage.Type.ToToastTextColorClass(), ToastMessage != null), (ToastMessage.Type.ToToastBackgroundColorClass(), ToastMessage != null));
but in the regular toast we find this:
On line 28:
protected override string? ClassNames => BlazorBootstrapComponentBase.BuildClassNames(base.Class, ("toast", true));
Perhaps I'm misunderstanding something, but I suspect it might be a bug.
Metadata
Metadata
Assignees
Labels
No labels
