import React from 'react' import { StyleSheet, Text, View, TouchableOpacity, Dimensions, PixelRatio, } from 'react-native' import Bubble from '../Bubble' const { width, height } = Dimensions.get('window') class TopTabBar extends React.Component { constructor(props) { super(props) } render() { return ( {this.props.tabs.map((tab, i) => { let right = 10 if ( (tab.split('/') && tab.split('/')[0].length > 2) || tab.split('/')[1] > 9 ) { right = 10 } else { right = 16 } return ( this.props.goToPage(i)}> {tab.split('/')[0]} ) })} ) } } const styles = StyleSheet.create({ tab: { flex: 1, alignItems: 'center', justifyContent: 'center', paddingBottom: 10, }, tabs: { height: 35, flexDirection: 'row', // paddingTop: 10 }, }) export default TopTabBar