You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems like an oversight indeed. Other places seem to be correct. @stsrki any specific reason why options could take precedence over the more specific definition in the component?
As a side note, this does not seem to be used anywhere:
Describe the bug
I am unable to override BlazoriseOptions.IconSize at the Icon component level.
To Reproduce
In Program.cs ::
services.AddBlazorise(options => {
options.IconStyle = IconStyle.Solid;
options.IconSize = IconSize.Small;
});
In Razor::
Expected behavior
I expect to be able to override any BlazoriseOptions at the Component level.
Screenshots
Additional context
Icon.razor.cs
CURRENT
protected IconSize GetIconSize() => Options.IconSize ?? IconSize ?? Blazorise.IconSize.Default;
protected IconStyle GetIconStyle() => Options.IconStyle ?? IconStyle ?? Blazorise.IconStyle.Solid;
RECOMMEDED
protected IconSize GetIconSize() => IconSize ?? Options.IconSize ?? Blazorise.IconSize.Default;
protected IconStyle GetIconStyle() => IconStyle ?? Options.IconStyle ?? Blazorise.IconStyle.Solid;
This change should be made for any component that implements a BlazoriseOptions setting.
The text was updated successfully, but these errors were encountered: