-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b09c1ac
commit 12b013f
Showing
8 changed files
with
127 additions
and
12 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import React from "react"; | ||
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs"; | ||
import { Home } from "../screens"; | ||
import Ionicons from "react-native-vector-icons/Ionicons"; | ||
import { COLORS } from "../constants"; | ||
|
||
const TabStack = createBottomTabNavigator(); | ||
|
||
const HomeTabGroup = () => { | ||
return ( | ||
<TabStack.Navigator | ||
screenOptions={({ route }) => ({ | ||
tabBarActiveTintColor: COLORS.primary, | ||
tabBarIcon: ({ focused, color }) => { | ||
let iconName; | ||
if (route.name === "home") { | ||
iconName = focused ? "home" : "home-outline"; | ||
return <Ionicons name={iconName} size={32} color={color} />; | ||
} | ||
if (route.name === "profile") { | ||
iconName = focused ? "person" : "person-outline"; | ||
return <Ionicons name={iconName} size={32} color={color} />; | ||
} | ||
if (route.name === "chat") { | ||
iconName = focused | ||
? "chatbubble-ellipses" | ||
: "chatbubble-ellipses-outline"; | ||
return <Ionicons name={iconName} size={32} color={color} />; | ||
} | ||
}, | ||
headerShown: false, | ||
tabBarShowLabel: false, | ||
tabBarStyle: { | ||
position: "absolute", | ||
height: 80, | ||
borderWidth: 0, | ||
paddingBottom: 25, | ||
}, | ||
})} | ||
> | ||
<TabStack.Screen name="home" component={Home} /> | ||
<TabStack.Screen name="chat" component={Home} /> | ||
<TabStack.Screen name="profile" component={Home} /> | ||
</TabStack.Navigator> | ||
); | ||
}; | ||
|
||
export default HomeTabGroup; |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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