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
I was trying to use use the component with Global Import using the library.add() method.
This is the way I'm trying to use it: <FontAwesomeIcon icon="fa-solid fa-bars" />
But when I pass a string to the icon prop, it show's me this error: Type '"fa-solid fa-bars"' is not assignable to type 'IconProp'.
I look up the interface definition for the Props (node_modules@fortawesome\react-native-fontawesome\index.d.ts) and added a string option to the icon prop like this:
exportinterfaceProps{icon: IconProp|string;
...
}
But this change is only temporary on node_modules. I don't know if this is a issue or if there is a correct way to do this. Please someone help me out!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I was trying to use use the component with Global Import using the
library.add()
method.This is the way I'm trying to use it:
<FontAwesomeIcon icon="fa-solid fa-bars" />
But when I pass a string to the icon prop, it show's me this error:
Type '"fa-solid fa-bars"' is not assignable to type 'IconProp'.
I look up the interface definition for the Props (node_modules@fortawesome\react-native-fontawesome\index.d.ts) and added a string option to the icon prop like this:
But this change is only temporary on node_modules. I don't know if this is a issue or if there is a correct way to do this. Please someone help me out!
Beta Was this translation helpful? Give feedback.
All reactions