import React from 'react' ; import { Platform } from 'react-native' ; import { createStackNavigator , createBottomTabNavigator , } from 'react-navigation' ; import TabBarIcon from '../components/TabBarIcon' ; import HomeScreen from '../screens/HomeScreen' ; import SettingsScreen from '../screens/SettingsScreen' ; import MyPageScreen from '../screens/MyPageScreen' ; interface TabProps { focused : boolean ; } const HomeStack = createStackNavigator ( { Home : HomeScreen , } ) ; HomeStack . navigationOptions = { tabBarLabel : 'Home' , tabBarIcon : ( { focused } ) => ( < TabBarIcon focused = { focused } name = { Platform . OS === 'ios' ? 'ios-home' : 'md-home' } / > ) , } ; const SettingsStack = createStackNavigator ( { Settings : SettingsScreen , } ) ; SettingsStack . navigationOptions = { tabBarLabel : 'Notifications' , tabBarIcon : ( { focused } ) => ( < TabBarIcon focused = { focused } name = { Platform . OS === 'ios' ? 'ios-notifications' : 'md-notifications' } / > ) , } ; const MyPageStack = createStackNavigator ( { MyPage : MyPageScreen , } ) ; MyPageStack . navigationOptions = { tabBarLabel : 'MyPage' , tabBarIcon : ( { focused } ) => ( < TabBarIcon focused = { focused } name = { Platform . OS === 'ios' ? 'ios-person' : 'md-person' } / > ) , } ; export default createBottomTabNavigator ( { HomeStack , SettingsStack , MyPageStack , } ) ;