Advertisement
Guest User

Untitled

a guest
Oct 21st, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. import React, { Component } from 'react';
  2. import { StackNavigator, TabNavigator } from 'react-navigation';
  3. import Login from './src/containers/Login';
  4. import Register from './src/containers/Register';
  5. import Home from './src/Home';
  6. import Timeline from './src/components/Timeline';
  7. import Calendar from './src/components/Calendar';
  8. import Icon from 'react-native-vector-icons/FontAwesome';
  9.  
  10. const App = StackNavigator({
  11. Login: {
  12. screen: Login,
  13. navigationOptions: {
  14. header: null
  15. }
  16. },
  17. Register: {
  18. screen: Register,
  19. navigationOptions: {
  20. header: null
  21. }
  22. },
  23. Home: {
  24. screen: TabNavigator,
  25. navigationOptions: {
  26. header: null
  27. }
  28. }
  29. });
  30.  
  31. const TabDashboard = TabNavigator(
  32. {
  33. Home: {
  34. screen: App,
  35. navigationOptions: {
  36. tabBarLabel: 'Dashboard',
  37. tabBarIcon: ({ tintColor }) =>
  38. <Icon name="home" size={20} style={{ color: tintColor }} />
  39. }
  40. },
  41. Timeline: {
  42. screen: Timeline,
  43. navigationOptions: {
  44. tabBarLabel: 'Timeline',
  45. tabBarIcon: ({ tintColor }) =>
  46. <Icon name="clock-o" size={20} style={{ color: tintColor }} />
  47. }
  48. },
  49. Calendar: {
  50. screen: Calendar,
  51. navigationOptions: {
  52. tabBarLabel: 'Calendar',
  53. tabBarIcon: ({ tintColor }) =>
  54. <Icon name="calendar" size={20} style={{ color: tintColor }} />
  55. }
  56. },
  57. },
  58. {
  59. lazy: true,
  60. tabBarPosition: 'top',
  61. tabBarOptions: {
  62. activeTintColor: '#ffffff',
  63. inactiveTintColor : '#ff5983',
  64. style: {
  65. backgroundColor: '#f50057'
  66. },
  67. showIcon: true
  68. }
  69. }
  70. )
  71.  
  72. export default TabDashboard;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement