You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
onChange={index=>this.setState({ selectedTab: index })}
50
-
/>;
56
+
constExample= () => {
57
+
const [selectedTab, setSelectedTab] =useState(0);
58
+
59
+
return (
60
+
<SafeAreaView style={styles.container}>
61
+
<MaterialTabs
62
+
items={['One', 'Two', 'Three', 'Four', 'Five']}
63
+
selectedIndex={selectedTab}
64
+
onChange={setSelectedTab}
65
+
barColor="#1fbcd2"
66
+
indicatorColor="#fffe94"
67
+
activeTextColor="white"
68
+
/>
69
+
</SafeAreaView>
70
+
);
71
+
};
72
+
73
+
conststyles=StyleSheet.create({
74
+
container: {
75
+
flex:1,
76
+
},
77
+
});
51
78
```
52
79
53
80
## Available Props
@@ -67,44 +94,3 @@ import MaterialTabs from 'react-native-material-tabs';
67
94
| allowFontScaling | true | boolean | Specifies whether fonts should scale to respect Text Size accessibility settings |
68
95
| uppercase | true | boolean | Specifies whether to uppercase the tab labels |
69
96
| keyboardShouldPersistTaps | never | string | Specifies how the [ScrollView](https://facebook.github.io/react-native/docs/scrollview#keyboardshouldpersisttaps) should respond to taps while keyboard is open |
0 commit comments