AlbertBrand / react-native-android-tablayout

React Native Android TabLayout native component
141 stars 29 forks source link

React Native 0.19 problem with props #11

Closed lopezjurip closed 8 years ago

lopezjurip commented 8 years ago

Updated to RN 0.19 and <Tab/> props are not working:

import { Tab, TabLayout } from 'react-native-android-tablayout'
import Colors from '../../global/colors'
<TabLayout
  style={styles.tabs}
  selectedTabIndicatorColor="white"
  selectedTab={this.state.selected}
  onTabSelected={e => this.setState({ selected: e.nativeEvent.position })}>

  <Tab name="Mapas" accessibilityLabel="Mapas" textColor={this.state.selected === 0 ? 'white' :'#d3d3d3'} />
  <Tab name="Información" accessibilityLabel="Información" textColor={this.state.selected === 1 ? 'white' :'#d3d3d3'} />

</TabLayout>
const styles = StyleSheet.create({
  tabs: {
    elevation: 10,
    backgroundColor: Colors.MAIN,
  },
})

image

Expected tabs with white text and white indicator

Overload119 commented 8 years ago

+1 I have the same issue.

AlbertBrand commented 8 years ago

Confirmed. I'll have a look tomorrow.

AlbertBrand commented 8 years ago

This is caused by the breaking package name change mentioned in https://github.com/facebook/react-native/issues/5649

AlbertBrand commented 8 years ago

Fixed in 0.1.0, which is now RN 0.19+ only.