Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6213

unable to use Font Awesome Icons in React Native

$
0
0

I am trying to use font awesome icons in my app but only some of them work while others give an error and show up as a question mark.

For example, these work:

import Icon from 'react-native-vector-icons/FontAwesome';<Icon              name="user"              style={styles.userIcon}              size={moderateScale(20)}            /><Icon name="star" size={moderateScale(13)} />

But this does not:

<View><Icon name="smoking" color="green"></Icon></View>

Even though all of these icons are present here in this directory:

https://fontawesome.com/icons?d=gallery&q=smoking

Secondly, how can I use the light version of an icon? For example, the user icon that I am using is filled. How can I change it to the light one as shown in the directory search? Both of them have same names.


Viewing all articles
Browse latest Browse all 6213

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>