Я обнаружил, что вы можете использовать "tabBarIcon" с любым компонентом и сделать его текстом =)
<Tab.Navigator
screenOptions={({ route }) => ({
tabBarIcon: ({ focused }) => {
let iconName;
let fontStyle;
let fontSize;
let fontColor;
let unFocusColor = "rgba(255, 255, 255, 0.5)";
let focusSetting = () => {
fontStyle = focused ? "norms-bold" : "norms-regular";
fontColor = focused ? "white" : unFocusColor;
fontSize = focused ? 18 : 17;
};
if (route.name === "stats") {
iconName = "stats";
focusSetting();
} else if (route.name === "main") {
iconName = "main";
focusSetting();
} else if (route.name === "profile") {
iconName = "profile";
focusSetting();
}
return (
<Text
style={{
fontFamily: fontStyle,
fontSize: fontSize,
color: fontColor,
}}
>
{iconName}
</Text>
);
},
})}
tabBarOptions={{
activeTintColor: "white",
tabStyle: {
maxWidth: 70,
},
style: {
alignItems: "center",
paddingRight: "5%",
backgroundColor: "black",
borderTopColor: "rgba(255, 255, 255, 0.35)",
borderTopWidth: 0.5,
},
showLabel: false,
}}
listeners={{
tabPress: Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light),
}}
>
<Tab.Screen name="stats" component={StatsScreen} />
<Tab.Screen name="main" component={MainScreen} />
<Tab.Screen name="profile" component={ProfileScreen} />
</Tab.Navigator>