Closed nassif7 closed 2 years ago
Hi @nassif7 that's not supported with the macro. Please take a look at the docs and see if there is an alternative way that will work for you. If you are still having troubles let us know.
Hello @robmadole, thank you for the reply. do you think will be supported any soon ?
Sorry, no @nassif7. This is a restriction of how Babel works that we don't have a solution for. You can think of this more akin to strict typing. Babel has to know what the icon is before it outputs the final JS. So using dynamic icon names is not possible with this current method.
Describe the bug I am Trying to make an Icon component that takes IconeName as a prop and pass this to a
<FontAwesomeIcon icon={regular(iconeName)}/>
but i am getting compile error
Only string literals are supported when referencing icons (use a string here instead)
in case i do this
<FontAwesomeIcon icon={solid('phone')} />
it works but thisdoesn't work
I am using macros and fontawesome 6