|
1 | 1 | import AntDesign from '@expo/vector-icons/AntDesign'; |
| 2 | +import Ionicons from '@expo/vector-icons/Ionicons'; |
2 | 3 | import { Tabs } from 'expo-router'; |
3 | 4 | import { StatusBar } from 'expo-status-bar'; |
4 | 5 | import React from 'react'; |
| 6 | +import { View } from 'react-native'; |
5 | 7 |
|
6 | 8 | import BottomTabBar from '@/components/tabbar/BottomTabBar'; |
7 | 9 |
|
8 | 10 | const RootLayout = () => { |
9 | 11 | return ( |
10 | | - <React.Fragment> |
| 12 | + <View style={styles.container}> |
11 | 13 | <StatusBar style="auto" /> |
12 | 14 | <Tabs |
13 | 15 | tabBar={(props) => <BottomTabBar {...props} />} |
14 | 16 | screenOptions={{ |
15 | | - // headerShown: false, |
16 | | - // tabBarStyle: { display: 'none' }, |
| 17 | + headerShown: false, |
17 | 18 | tabBarActiveTintColor: '#4B6BFB', |
18 | 19 | tabBarInactiveTintColor: '#666666', |
19 | 20 | }} |
20 | 21 | > |
21 | 22 | <Tabs.Screen |
22 | | - name="index" |
| 23 | + name="recipients" |
| 24 | + options={{ |
| 25 | + title: 'Recipients', |
| 26 | + tabBarIcon: ({ color, size }) => ( |
| 27 | + <Ionicons name="people-outline" size={size} color={color} /> |
| 28 | + ), |
| 29 | + }} |
| 30 | + /> |
| 31 | + <Tabs.Screen |
| 32 | + name="(gifts)" |
23 | 33 | options={{ |
24 | 34 | title: 'Home', |
25 | 35 | tabBarIcon: ({ color, size }) => ( |
26 | 36 | <AntDesign name="home" size={size} color={color} /> |
27 | 37 | ), |
28 | 38 | }} |
29 | 39 | /> |
30 | | - <Tabs.Screen name="second" options={{ title: 'Settings' }} /> |
| 40 | + <Tabs.Screen |
| 41 | + name="settings" |
| 42 | + options={{ |
| 43 | + title: 'Settings', |
| 44 | + tabBarIcon: ({ color, size }) => ( |
| 45 | + <AntDesign name="setting" size={size} color={color} /> |
| 46 | + ), |
| 47 | + }} |
| 48 | + /> |
31 | 49 | </Tabs> |
32 | | - </React.Fragment> |
| 50 | + </View> |
33 | 51 | ); |
34 | 52 | }; |
35 | 53 |
|
| 54 | +const styles = { |
| 55 | + container: { |
| 56 | + flex: 1, |
| 57 | + backgroundColor: '#FFFFFF', |
| 58 | + }, |
| 59 | +}; |
| 60 | + |
36 | 61 | export default RootLayout; |
0 commit comments