Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. import { createMaterialBottomTabNavigator } from 'react-navigation-material-bottom-tabs';
  2. import { createStackNavigator } from 'react-navigation';
  3. import Icon from 'react-native-vector-icons/MaterialIcons';
  4. import React from 'react';
  5.  
  6. import { primaryColor, secundaryColor } from '../helpers/colors'
  7.  
  8. import {
  9. Partners,
  10. LoginScreen,
  11. Pets,
  12. ProfileScreen,
  13. PetToAdoptScreen,
  14. RegisterScreen
  15. } from '../screens';
  16.  
  17.  
  18. const ProfileStack = createStackNavigator(
  19. {
  20. Profile: {
  21. screen: ProfileScreen,
  22. navigationOptions: () => ({
  23. header: null
  24. }),
  25. },
  26. PetToAdopt: {
  27. screen: PetToAdoptScreen,
  28. navigationOptions: () => ({
  29. title: `Adicionar pet para adoção`
  30. }),
  31. },
  32. Register: {
  33. screen: RegisterScreen,
  34. navigationOptions: () => ({
  35. title: `Registrar`
  36. }),
  37. },
  38. Login: {
  39. screen: LoginScreen,
  40. navigationOptions: () => ({
  41. title: `Login`
  42. }),
  43. },
  44. },
  45. {
  46. navigationOptions: {
  47. headerStyle: {
  48. backgroundColor: secundaryColor,
  49. },
  50. headerTintColor: primaryColor,
  51. },
  52. }
  53. )
  54.  
  55. const BottomNavigationStack = createMaterialBottomTabNavigator(
  56. {
  57. Profile: {
  58. screen: ProfileStack,
  59. navigationOptions: () => ({
  60. title: `Perfil`,
  61. tabBarIcon: <Icon name={'person'} size={22} color={ primaryColor } />
  62. }),
  63. },
  64. Pets: {
  65. screen: Pets,
  66. navigationOptions: () => ({
  67. title: `Pets`,
  68. tabBarIcon: <Icon name={'pets'} size={22} color={ primaryColor } />
  69. }),
  70. },
  71. Partners: {
  72. screen: Partners,
  73. navigationOptions: () => ({
  74. title: `Parceiros`,
  75. tabBarIcon: <Icon name={'card-giftcard'} size={22} color={ primaryColor } />
  76. }),
  77. }
  78. },
  79. {
  80. initialRouteName: 'Profile',
  81. activeColor: primaryColor,
  82. inactiveColor: primaryColor,
  83. barStyle: { backgroundColor: secundaryColor },
  84. }
  85. );
  86.  
  87. export { BottomNavigationStack, ProfileStack }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement