Closed EstebanBorai closed 6 years ago
It’s a bit more complicated than that since you need to support styles as wel (solid, regular, light). My recommendation: use the official React component for FontAwesome, I plan to stop supporting this component because there is now an official version available. Thanks!
Hi, I have been using your react-fontawesome component and is great! But I wanted to use the brand icons, and I noticed that the only icons that render are the icons before version 5.
In this new version we can find some of the icons comes with a new prefix:
fas fa-play
,fab fa-js
.I wanted to know if we are able to add support to this new icon class names. I have two approaches:
Add a prop to identify the icon type and then add the right class name:
<FontAwesome name="js" category="brand" />
So the class name will be:class="fab fa-js"
Identify the prefix based on the icon name: For this approach we will need a list of the icons for each category and then automatically add the class name for the respective icon.
I think the first approach is the best because we still able to use older versions of FontAwesome.