MCPcopy
hub / github.com/ptomasroos/react-native-scrollable-tab-view / renderTab

Function renderTab

DefaultTabBar.js:38–49  ·  view source on GitHub ↗
(name, page, isTabActive, onPressHandler)

Source from the content-addressed store, hash-verified

36 },
37
38 renderTab(name, page, isTabActive, onPressHandler) {
39 const { activeTextColor, inactiveTextColor, textStyle, } = this.props;
40 const textColor = isTabActive ? activeTextColor : inactiveTextColor;
41 const fontWeight = isTabActive ? 'bold' : 'normal';
42
43 return <Button
44 style={{flex: 1, }}
45 key={name}
46 accessible={true}
47 accessibilityLabel={name}
48 accessibilityTraits='button'
49 onPress={() => onPressHandler(page)}
50 >
51 <View style={[styles.tab, this.props.tabStyle, ]}>
52 <Text style={[{color: textColor, fontWeight, }, textStyle, ]}>

Callers 1

DefaultTabBar.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…