Created
May 29, 2020 21:26
-
-
Save sezeresim/ab721a8f0bd6140a7c3ff0ff122f1538 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//TabBarNavigation | |
const TabNavigation = () => { | |
return ( | |
<Tab.Navigator | |
screenOptions={({route}) => ({ | |
tabBarIcon: ({focused, color, size}) => { | |
let iconName; | |
if (route.name === 'Home') { | |
iconName = focused ? 'ios-search' : 'ios-search'; | |
} else if (route.name === 'More') { | |
iconName = focused ? 'ios-albums' : 'ios-albums'; | |
} else if (route.name === 'Profile') { | |
iconName = focused ? 'ios-person' : 'ios-person'; | |
} | |
return <Ionicons name={iconName} size={size} color={color} />; | |
}, | |
})} | |
tabBarOptions={{ | |
activeTintColor: 'black', | |
inactiveTintColor: 'gray', | |
}}> | |
<Tab.Screen | |
name="Home" | |
component={HomeScreen} | |
options={{ | |
tabBarLabel: 'Keşfet', | |
}} | |
/> | |
<Tab.Screen | |
name="More" | |
component={AccountScreen} | |
options={{ | |
tabBarLabel: 'Bana Özel', | |
}} | |
/> | |
<Tab.Screen | |
name="Profile" | |
component={ProfileScreen} | |
options={{ | |
tabBarLabel: 'Profil', | |
}} | |
/> | |
</Tab.Navigator> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment