Blazorise
Blazorise copied to clipboard
[Bug]: Icon for IconName.FileAlt incorrectly uses fa-file-lines
Blazorise Version
1.5.1
What Blazorise provider are you running on?
Bootstrap5
Link to minimal reproduction or a simple code snippet
https://gist.github.com/paulsterling/ca8b2e99d4cee0feb78af59d5a5af8c0#file-blazorise-iconname-filealt
Steps to reproduce
This is admittedly a very minor issue and one I will try to submit a PR for.
At some point the FA icon assigned to the Blazorise FileAlt
icon has been set to fa-file-lines
rather than fa-file-alt
. In my case this causes no icon to render (I am using it a a button in the RTE toolbar).
See line 822 in Source/Extensions/Blazorise.Icons.FontAwesome/FontAwesomeIcons.cs
822 | public static readonly string FileAlt = "fa-file-lines";
--
845 | public static readonly string FileLines = "fa-file-lines";
Code Usage Example:
<RichTextEditToolbarGroup Float="Float.End">
<Text TextWeight="TextWeight.Light">Templates</Text>
<Button Clicked="@ShowTemplateModal">
<Icon Name="IconName.FileAlt" />
</Button>
</RichTextEditToolbarGroup>
What is expected?
The fa-file-alt icon is rendered when IconName.FileAlt
is used.
What is actually happening?
No icon is rendered for the IconName.FileAlt
Blazorise Icon
What browsers do you see the problem on?
Chrome
Any additional comments?
Nothing else.
This probably happened because of the changes we did in 1.5 after we moved to FA 6.x—previously a lot of icons used -alt
versions. After migration to 6.x, we had a chance to use basic icons instead of alt icons, which we did. It might be that we have accidentally overdid it.
PR would be greatly help us if possible.
I sat down to fix this up and discovered the issue is not an incorrect assignment in Source/Extensions/Blazorise.Icons.FontAwesome/FontAwesomeIcons.cs
but rather that I had not updated the stylesheet reference in Index.html
to FontAwesome v6. With that updated the icons render as expeccted.
<link href="_content/Blazorise.Icons.FontAwesome/v6/css/all.min.css" rel="stylesheet">
Closing this issue :-)