-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathTabView.js
43 lines (40 loc) · 1.02 KB
/
TabView.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import React, {Component} from 'react';
import {StyleSheet} from 'react-native';
import ScrollableTabView, {DefaultTabBar} from 'react-native-scrollable-tab-view';
import colors from '../assets/colors';
class TabView extends Component {
render() {
return (
<ScrollableTabView
initialPage={0}
renderTabBar={() => {
return (
<DefaultTabBar
backgroundColor={'white'}
activeTextColor={colors.section_title}
inactiveTextColor={colors.gray_icon}
textStyle={styles.tabBarText}
underlineStyle={styles.tabBarUnderline}
tabStyle={styles.tabBar}
/>
);
}}>
{this.props.children}
</ScrollableTabView>
);
}
}
const styles = StyleSheet.create({
tabBarText: {
fontWeight: '500',
textTransform: 'uppercase',
},
tabBarUnderline: {
height: 2,
backgroundColor: colors.primary_theme,
},
tabBar: {
paddingTop: 10,
},
});
export default TabView;