简体   繁体   中英

React Native Navigation 5.0 bottomTabs - how to change the font size?

is there a way to change the font size of the two "name" props below in React Native Navigation 5.0?


const Tab = createBottomTabNavigator();

export const Nav = () => {
  return (
    <NavigationContainer>
      <Tab.Navigator>
        <Tab.Screen name="Game" component={HomeStackScreen} />
        <Tab.Screen name="Map" component={SettingsStackScreen} />
      </Tab.Navigator>
    </NavigationContainer>
  );
};

Add tabBoarOptions to your code like this.

const Tab = createBottomTabNavigator();

export const Nav = () => {
  return (
    <NavigationContainer>
      <Tab.Navigator
          labelStyle: {
            fontSize: 10,
            fontFamily:'GothamBook'
           
          },>
    <Tab.Screen name="Game" component={HomeStackScreen} />
    <Tab.Screen name="Map" component={SettingsStackScreen} />
  </Tab.Navigator>
</NavigationContainer>

); };

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM