我是React Native的初学者,我想使用自己的图标:
(assets / user.png)
只需将MaterialCommunityIcons交换给我自己。反应Native 5.x
但是我不知道该怎么做...
这里的代码:
<Tab.Navigator
activeColor="#3e2465"
inactiveColor="#8366ae"
barStyle={{ backgroundColor: '#f1eded' }}
>
<Tab.Screen name="Home"
component={Map}
options={{
tabBarLabel: 'Map',tabBarIcon: ({ color }) => (
<MaterialCommunityIcons name="map" color={color} size={26} />
),}}
/>
<Tab.Screen name="Login"
component={EventList}
options={{
tabBarLabel: 'EventList',tabBarIcon: ({ color }) => (
<MaterialCommunityIcons name="cup" color={color} size={26} />
),}}
/>
<Tab.Screen name="Logi1n"
component={Profile}
options={{
tabBarLabel: 'Profile',tabBarIcon: ({ color }) => (
<MaterialCommunityIcons name="account-box-outline" color={color} size={26} />
),}}
/>
</Tab.Navigator>