我可以在同一屏幕上导入react-native-vector-icons/font- and和react-native-vector-icons/Ionicons吗?基本上我想在同一个屏幕上同时使用字体和离子图标来显示不同的图标?
Example-
import ActionButton from 'react-native-action-button';
import Icon from 'react-native-vector-icons/font-awesome';
import Icon from 'react-native-vector-icons/Ionicons';发布于 2017-11-23 21:03:29
可以,停那儿吧。由于FontAwesome和Ionicons导出为默认值,因此您可以使用任何名称导入它们,如下所示
import FontAwesomeIcon from 'react-native-vector-icons/FontAwesome';
import IonIcon from 'react-native-vector-icons/Ionicons';在您的render()方法中使用类似
<FontAwesomeIcon name="github" size={16} color="red">
<IonIcon name="github" size={16} color="blue">https://stackoverflow.com/questions/47454205
复制相似问题