Last active
September 6, 2016 16:07
-
-
Save yogieputra8/2d44a5699a275a132a30139ca50cfc02 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
import React, { Component } from 'react'; | |
import { | |
AppRegistry, | |
TabBarIOS, | |
StyleSheet, | |
Text, | |
View | |
} from 'react-native'; | |
import buy from './buy'; | |
import Icon from 'react-native-vector-icons/Ionicons'; | |
import nargo from './nargo.ios'; | |
class Main extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
selectedTab: 'nargo' | |
}; | |
} | |
render() { | |
return ( | |
<TabBarIOS selectedTab={this.state.selectedTab} | |
barTintColor='#dcdcdc'> | |
<Icon.TabBarItem | |
title="nargo" | |
iconName="ios-home" | |
selectedIconName="ios-home" | |
selected={this.state.selectedTab === 'nargo'} | |
onPress={() => { | |
this.setState({ | |
selectedTab: 'nargo', | |
}); | |
}}> | |
<nargo navigator={this.props.navigator} /> | |
</Icon.TabBarItem> | |
<Icon.TabBarItem | |
onPress={() => { | |
this.setState({ | |
selectedTab: 'chat', | |
}); | |
}} | |
selected={this.state.selectedTab === 'chat'} | |
title="Chat" | |
iconName="ios-chatbubbles" | |
selectedIconName="ios-chatbubbles"> | |
</Icon.TabBarItem> | |
</TabBarIOS> | |
); | |
} | |
} | |
module.exports = Main; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment