Created
January 6, 2020 09:56
-
-
Save gys-dev/5c812cdc08db4b0487b8b0602b4b930c to your computer and use it in GitHub Desktop.
This file contains 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 {View, Text} from 'react-native' | |
import {createBottomTabNavigator} from 'react-navigation-tabs' | |
import {createAppContainer} from 'react-navigation'; | |
import {createStackNavigator} from 'react-navigation-stack'; | |
import HomeScreen from '../screens/HomeScreen' | |
import DetailScreen from '../screens/DetailScreen'; | |
import Icon from 'react-native-ionicons' | |
import DemoScreen from '../screens/DemoScreen' | |
const MainNavigator = createStackNavigator({ | |
HomeStack: {screen: HomeScreen}, | |
Detail: {screen: DetailScreen}, | |
}); | |
const TabIcon = (props) => ( | |
<Icon ios="home" android="home" /> | |
) | |
const App = createAppContainer(MainNavigator); | |
const BottomTabNavigator = createBottomTabNavigator({ | |
Home: { | |
screen: App, | |
navigationOptions: { | |
tabBarIcon: TabIcon, | |
} | |
}, | |
Explore: { | |
screen: DemoScreen, | |
navigationOptions: { | |
tabBarIcon: <Icon ios="apps" android="apps" /> | |
} | |
}, | |
Create: { | |
screen: HomeScreen, | |
navigationOptions: { | |
tabBarIcon: <Icon ios="person" android="person" /> | |
} | |
} | |
}, { | |
tabBarOptions: { | |
showLabel: false, | |
showIcon: true | |
} | |
}); | |
export default BottomTabNavigator; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment