Nativebase: Use more than one Icon Family

Created on 14 Aug 2017  路  3Comments  路  Source: GeekyAnts/NativeBase

Hi!, we need to use more than one icon family, is this supported?

Most helpful comment

I wish there was a way to use other icon families within nativebase but for others trying to do the same thing, this is what I ended up putting together to get around it:

import IconFA from "react-native-vector-icons/FontAwesome";
<IconFA name="balance-scale" style={{fontSize: 16}} />

All 3 comments

@nschurmann One way of doing this is wrapping the Icon with StyleProvider and passing theme with different iconFamily variable. Check this for customization. And the other way is importing different icons from react-native-vector-icons and use them.

@shivrajkumar is there anyway to use more than one iconFamily? It would be great to be able to use the same icon styles but with icons from different icon families. Maybe a iconFamily prop on the that overrides the iconFamily variable in the theme?

I wish there was a way to use other icon families within nativebase but for others trying to do the same thing, this is what I ended up putting together to get around it:

import IconFA from "react-native-vector-icons/FontAwesome";
<IconFA name="balance-scale" style={{fontSize: 16}} />
Was this page helpful?
0 / 5 - 0 ratings