PedroBern / react-native-collapsible-tab-view

A cross-platform Collapsible Tab View component for React Native
MIT License
831 stars 161 forks source link

Styling the Tabs Labels #176

Closed adelaadeoye closed 3 years ago

adelaadeoye commented 3 years ago

Please is there anyone who could assist in styling the labels for the Tabs .

This is what I have at the moment

 <Tabs.Tab
          name="Schedule"
          label="Schedules"
          labelStyle={{
            color: 'red',
            fontSize: 8,
          }}>

But it is not working

andreialecu commented 3 years ago

Upgrade to version 4.2.0 so that renderTabBar is available:

Example:

<Tabs.Container renderTabBar={(props) => (
            <MaterialTabBar
              {...props}
              style={...}
              labelStyle={...}
              indicatorStyle={...}
              scrollEnabled={true/false}
            />} ...
adelaadeoye commented 3 years ago

Upgrade to version 4.2.0 so that renderTabBar is available:

Example:

<Tabs.Container renderTabBar={(props) => (
            <MaterialTabBar
              {...props}
              style={...}
              labelStyle={...}
              indicatorStyle={...}
              scrollEnabled={true/false}
            />} ...

Thanks, A colleague provided me with this and it work


<Tabs.Container
        TabBarComponent={(props) => (
          <MaterialTabBar
            {...props}
            activeColor={Colors.AmberRed}
            labelStyle={{fontSize: 9, fontWeight: 'bold'}}
            indicatorStyle={{backgroundColor: Colors.AmberRed}}
          />

```    and it also work