Skip to content

Commit ff8c461

Browse files
committed
Pass labelStyle and selectedLabelStyle to expose the potential error in TabBarItem
1 parent 1fd262c commit ff8c461

File tree

1 file changed

+12
-2
lines changed
  • demo/src/screens/componentScreens/TabControllerScreen

1 file changed

+12
-2
lines changed

demo/src/screens/componentScreens/TabControllerScreen/index.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, {Component} from 'react';
2-
import {ActivityIndicator} from 'react-native';
2+
import {ActivityIndicator, StyleSheet} from 'react-native';
33
import {Assets, TabController, Colors, View, Text, Button, TabControllerItemProps} from 'react-native-ui-lib';
44
import {gestureHandlerRootHOC} from 'react-native-gesture-handler';
55
import _ from 'lodash';
@@ -161,7 +161,8 @@ class TabControllerScreen extends Component<{}, State> {
161161
backgroundColor={fewItems ? 'transparent' : undefined}
162162
// labelColor={'green'}
163163
// selectedLabelColor={'red'}
164-
// labelStyle={{fontSize: 20}}
164+
labelStyle={styles.labelStyle}
165+
selectedLabelStyle={styles.selectedLabelStyle}
165166
// iconColor={'green'}
166167
// selectedIconColor={'blue'}
167168
enableShadow
@@ -203,3 +204,12 @@ class TabControllerScreen extends Component<{}, State> {
203204
}
204205

205206
export default gestureHandlerRootHOC(TabControllerScreen);
207+
208+
const styles = StyleSheet.create({
209+
labelStyle: {
210+
fontSize: 16
211+
},
212+
selectedLabelStyle: {
213+
fontSize: 16
214+
}
215+
});

0 commit comments

Comments
 (0)