react-navigation-material-bottom-tabs中的tabBarLabel和Icon对齐问题

我正在为我的项目之一使用React Navigation的createMaterialBottomTabNavigator。如果我同时使用tabBarIcon和tabBarLabel图标则与文本重叠。需要帮助来解决此问题。 这是我尝试过的-

const MainNavigator = createMaterialBottomTabNavigator({
  Offers: {
    screen: Offersnavigator,navigationOptions:{
      tabBarIcon: (
        {focused}) => {
          return <IconButton icon="tag" style={{marginBottom: 5}} color={focused ? '#2E98FF' : '#000'} size={20}/>
      },tabBarLabel: 'Offers',},Search: SearchNavigator,Settings: Settingsnavigator,});

react-navigation-material-bottom-tabs中的tabBarLabel和Icon对齐问题

tan243991552 回答:react-navigation-material-bottom-tabs中的tabBarLabel和Icon对齐问题

像这样的保证金图标。它将完美运行。

<IconButton icon="tag" style={{marginTop: -3}} color={focused ? '#2E98FF' : '#000'} size={20}/>

本文链接:https://www.f2er.com/3147628.html

大家都在问