|
| 1 | +import Colors from '@/constants/Colors'; |
| 2 | +import { |
| 3 | + Ionicons, |
| 4 | + MaterialCommunityIcons, |
| 5 | + MaterialIcons, |
| 6 | +} from '@expo/vector-icons'; |
| 7 | +import { Tabs } from 'expo-router'; |
| 8 | +import { GestureHandlerRootView } from 'react-native-gesture-handler'; |
| 9 | + |
| 10 | +const TabsLayout = () => { |
| 11 | + return ( |
| 12 | + <GestureHandlerRootView style={{ flex: 1 }}> |
| 13 | + <Tabs |
| 14 | + screenOptions={{ |
| 15 | + tabBarStyle: { |
| 16 | + backgroundColor: Colors.background, |
| 17 | + }, |
| 18 | + tabBarActiveTintColor: Colors.primary, |
| 19 | + tabBarInactiveBackgroundColor: Colors.background, |
| 20 | + tabBarActiveBackgroundColor: Colors.background, |
| 21 | + headerStyle: { |
| 22 | + backgroundColor: Colors.background, |
| 23 | + }, |
| 24 | + headerShadowVisible: false, |
| 25 | + }} |
| 26 | + > |
| 27 | + <Tabs.Screen |
| 28 | + name="updates" |
| 29 | + options={{ |
| 30 | + title: 'Updates', |
| 31 | + tabBarIcon: ({ size, color }) => ( |
| 32 | + <MaterialIcons name="update" size={size} color={color} /> |
| 33 | + ), |
| 34 | + }} |
| 35 | + /> |
| 36 | + <Tabs.Screen |
| 37 | + name="calls" |
| 38 | + options={{ |
| 39 | + title: 'Calls', |
| 40 | + tabBarIcon: ({ size, color }) => ( |
| 41 | + <MaterialCommunityIcons |
| 42 | + name="phone-outline" |
| 43 | + size={size} |
| 44 | + color={color} |
| 45 | + /> |
| 46 | + ), |
| 47 | + }} |
| 48 | + /> |
| 49 | + <Tabs.Screen |
| 50 | + name="communities" |
| 51 | + options={{ |
| 52 | + title: 'Communities', |
| 53 | + tabBarIcon: ({ size, color }) => ( |
| 54 | + <MaterialIcons name="people" size={size} color={color} /> |
| 55 | + ), |
| 56 | + }} |
| 57 | + /> |
| 58 | + <Tabs.Screen |
| 59 | + name="chats" |
| 60 | + options={{ |
| 61 | + title: 'Chats', |
| 62 | + tabBarIcon: ({ size, color }) => ( |
| 63 | + <Ionicons name="chatbubbles" size={size} color={color} /> |
| 64 | + ), |
| 65 | + }} |
| 66 | + /> |
| 67 | + <Tabs.Screen |
| 68 | + name="settings" |
| 69 | + options={{ |
| 70 | + title: 'Settings', |
| 71 | + tabBarIcon: ({ size, color }) => ( |
| 72 | + <Ionicons name="cog" size={size} color={color} /> |
| 73 | + ), |
| 74 | + }} |
| 75 | + /> |
| 76 | + </Tabs> |
| 77 | + </GestureHandlerRootView> |
| 78 | + ); |
| 79 | +}; |
| 80 | + |
| 81 | +export default TabsLayout; |
0 commit comments