Skip to content

Instantly share code, notes, and snippets.

@dondragon2
Created March 10, 2017 14:59
Show Gist options
  • Save dondragon2/796ea8dab90045e5d5f2253b7e759859 to your computer and use it in GitHub Desktop.
Save dondragon2/796ea8dab90045e5d5f2253b7e759859 to your computer and use it in GitHub Desktop.
//HomeScreen
import React, { Component, PropTypes } from 'react';
import { Ionicons } from '@exponent/vector-icons';
import { TabNavigator } from 'react-navigation';
import Colors from '../../constants/Colors';
import PublicPlayersScreen from './public/PublicPlayersScreen';
import MyPlayersScreen from './personal/MyPlayersScreen';
import FavoriteScreen from './favorites/FavoriteScreen';
import ScheduledScreen from './scheduled/ScheduledScreen';
const PlayerNavigator = TabNavigator({
MyPlayers: { screen: MyPlayersScreen },
PublicPlayers: { screen: PublicPlayersScreen },
FavoriteScreen: { screen: FavoriteScreen },
ScheduledScreen: { screen: ScheduledScreen }
}, {
initialRouteName: 'MyPlayers',
headerMode: 'none',
swipeEnabled: true,
animationEnabled: true,
lazyLoad: true,
tabBarPosition: 'top',
tabBarOptions: {
showLabel: true,
showIcon: false,
inactiveTintColor: Colors.blackBlueColor,
activeTintColor: Colors.whiteColor,
pressColor: Colors.whiteColor,
indicatorStyle: {
backgroundColor: Colors.whiteColor
},
style: {
backgroundColor: Colors.redColor
},
labelStyle: {
fontSize: 13,
color: Colors.whiteColor
}
}
});
export default class HomeScreen extends Component {
static navigationOptions = {
title: 'Home',
header: {
style: {
backgroundColor: Colors.redColor
},
tintColor: Colors.whiteColor
},
tabBar: {
icon: ({ tintColor }) => (
<Ionicons
name="logo-buffer"
size={25}
color={tintColor}
/>
)
}
}
static propTypes = {
logout: PropTypes.func
}
render() {
return (
<PlayerNavigator />
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment