Created
September 25, 2017 14:46
-
-
Save kaueDM/89725d3109f5935e81c9be769da9fb34 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
import React, { Component } from 'react'; | |
import { Text } from 'native-base'; | |
import { StackNavigator, TabNavigator, TabBarTop } from 'react-navigation'; | |
import Login from '../components/Login.component'; | |
import WorkList from '../components/WorkList.component'; | |
import TaskList from '../components/TaskList.component'; | |
import Timer from '../components/Timer.component'; | |
const tabs = TabNavigator({ | |
WorkList: { | |
screen: WorkList, | |
navigationOptions: { | |
tabBarLabel: 'OBRAS', | |
tabBarIcon: null | |
} | |
}, | |
TaskList: { | |
screen: TaskList, | |
navigationOptions: { | |
tabBarLabel: 'TAREFAS', | |
tabBarIcon: null | |
} | |
} | |
}, | |
{ | |
tabBarPosition: 'top', | |
tabBarComponent: TabBarTop, | |
tabBarOptions: { | |
style: { | |
backgroundColor: '#0C61AA' | |
}, | |
labelStyle: { | |
fontWeight: '900' | |
}, | |
indicatorStyle: { | |
backgroundColor: '#FFDF13', | |
height: 5 | |
} | |
} | |
}) | |
const routes = { | |
Login: { | |
screen: Login, | |
navigationOptions: { | |
header: null | |
} | |
}, | |
Home: { | |
screen: tabs, | |
navigationOptions: { | |
headerStyle: { | |
shadowOpacity: 0, | |
backgroundColor: '#0C61AA', | |
height: 50, | |
elevation: 0 | |
}, | |
headerLeft: null, | |
headerRight: <Text style={{ color: '#fff', marginRight: 10, fontWeight: '900', fontSize: 12 }}>SAIR</Text> | |
} | |
}, | |
Timer: { | |
screen: Timer, | |
navigationOptions: { | |
header: null | |
} | |
} | |
//Outras rotas aqui | |
}; | |
const configuration = { | |
headerMode: 'screen', | |
initialRouteName: 'Login' | |
}; | |
const stack = StackNavigator({ | |
Login: { screen: Login } | |
}, { | |
headerMode: 'none' | |
}) | |
export const Root = StackNavigator(routes, configuration); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment