fontawesome.macro
fontawesome.macro copied to clipboard
MacroError: Only string literals are supported when referencing icons (use a string here instead)
I understand that this might be a Typescript issue rather than a macro issue, but I wonder if you could be of help.
I'm trying to make a basic utility to conditionally render "chevron-up" OR "chevron-down".
Doing this...
const chevronIconName: IconName = isExpanded ? "chevron-up" : "chevron-down";
const chevronIcon = solid(chevronIconName) ;
Throws this error and of course it breaks the webpack build.
MacroError: Only string literals are supported when referencing icons (use a string here instead)