Advertisement
Guest User

Untitled

a guest
Dec 18th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React, { Component } from 'react'
  2. import { Platform, AsyncStorage } from 'react-native'
  3. import { TabNavigator, TabBarBottom, TabBarTop } from 'react-navigation'
  4. import Icon from 'react-native-vector-icons/Ionicons'
  5. import Camera from '../screens/camera'
  6. import Perfil from '../screens/perfil'
  7. import Pesquisar from '../screens/pesquisar'
  8. import Ranking from '../screens/ranking'
  9. import TimelineNavigator from './timeline'
  10.  
  11. const tabs = {
  12.     Timeline: {
  13.         screen: TimelineNavigator,
  14.         navigationOptions: {
  15.             tabBarIcon: ({ tintColor }) => (
  16.                 <Icon name="ios-home-outline" size={30} color={tintColor} />
  17.             )
  18.         }
  19.     },
  20.  
  21.     Pesquisar: {
  22.         screen: Pesquisar,
  23.         navigationOptions: {
  24.             tabBarIcon: ({ tintColor }) => (
  25.                 <Icon name="ios-search-outline" size={30} color={tintColor} />
  26.             )
  27.         }
  28.     },
  29.  
  30.     Camera: {
  31.         screen: Camera,
  32.         navigationOptions: {
  33.             tabBarIcon: ({ tintColor }) => (
  34.                 <Icon name="ios-camera-outline" size={30} color={tintColor} />
  35.             )  
  36.         }
  37.      },
  38.     Ranking: {
  39.         screen: Ranking,
  40.         navigationOptions: {
  41.             tabBarIcon: ({ tintColor }) => (
  42.                 <Icon name="ios-star-outline" size={30} color={tintColor} />
  43.             )
  44.         }
  45.     },
  46.  
  47.     Perfil: {
  48.         screen: Perfil,
  49.         navigationOptions: {
  50.             tabBarIcon: ({ tintColor }) => (
  51.                 <Icon name="ios-person-outline" size={30} color={tintColor} />
  52.             )
  53.         }
  54.     }
  55. }
  56.  
  57. const opts = {
  58.     tabBarComponent: TabBarBottom,
  59.     tabBarPosition: 'bottom',
  60.     swipeEnabled: false,
  61.     animationEnabled: true,
  62.     tabBarOptions: {
  63.         showLabel: false,
  64.         activeTintColor: '#000',
  65.     }
  66. }
  67.  
  68. const navegadorRoot = TabNavigator(tabs, opts)
  69. export default navegadorRoot;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement