Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit 54c385c

Browse files
committed
feat: add RootLayout and HomeScreen components with tab navigation
1 parent d0fa3e0 commit 54c385c

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

src/app/_layout.tsx

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import AntDesign from '@expo/vector-icons/AntDesign';
2+
import { Tabs } from 'expo-router';
3+
import { StatusBar } from 'expo-status-bar';
4+
import React from 'react';
5+
6+
import BottomTabBar from '@/components/tabbar/BottomTabBar';
7+
8+
const RootLayout = () => {
9+
return (
10+
<React.Fragment>
11+
<StatusBar style="auto" />
12+
<Tabs
13+
tabBar={(props) => <BottomTabBar {...props} />}
14+
screenOptions={{
15+
// headerShown: false,
16+
// tabBarStyle: { display: 'none' },
17+
tabBarActiveTintColor: '#e91e63',
18+
}}
19+
>
20+
<Tabs.Screen
21+
name="index"
22+
options={{
23+
title: 'Home',
24+
tabBarIcon: ({ color, size }) => (
25+
<AntDesign name="home" size={size} color={color} />
26+
),
27+
}}
28+
/>
29+
<Tabs.Screen name="second" options={{ title: 'Settings' }} />
30+
</Tabs>
31+
</React.Fragment>
32+
);
33+
};
34+
35+
export default RootLayout;

src/app/second.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { Text, View } from 'react-native';
2+
3+
const HomeScreen = () => {
4+
return (
5+
<View>
6+
<Text>Tab Screen</Text>
7+
</View>
8+
);
9+
};
10+
11+
export default HomeScreen;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const TabBarButton = () => {};
2+
3+
export default TabBarButton;

0 commit comments

Comments
 (0)