0

Two lines up and down are createMaterialTopTabNavigator,I wont to customize the next line, but I can't remove paddingVertical part like the picture

tabBarOptions={{
          scrollEnabled: true,
          style: {
            backgroundColor: 'transparent',
          },
          tabStyle: {
            width: 'auto',
            margin: theme.sizes.radius,
            padding: 0, //only horizontal works,how to modify vertical padding ?
            backgroundColor: 'yellow',
          },
          labelStyle: {
            margin: 0,
            backgroundColor: 'red',
          },
          activeTintColor: theme.colors.default,
          renderIndicator: () => null,
        }}

1 Answers1

0

Try just style under tabBarOptions

tabBarOptions={{
    labelStyle: { fontSize: 12 },
    tabStyle: { width: 100, height: 100 },
    style: { backgroundColor: 'powderblue' },
}}

Detail here tabnavigator-extra-padding

Nooruddin Lakhani
  • 7,507
  • 2
  • 19
  • 39