-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
59 lines (47 loc) · 1.91 KB
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import React from "react";
import { NavigationContainer } from "@react-navigation/native";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { Ionicons } from "@expo/vector-icons";
import HomeScreen from "./screens/Home";
import TransactionScreen from "./screens/Transactions";
import ProfileScreen from "./screens/Profile";
import { TamaguiProvider } from "tamagui";
import config from "./tamagui.config";
import { Header } from "./components/Header";
const Tab = createBottomTabNavigator();
function App() {
return (
<TamaguiProvider config={config}>
<Header />
<NavigationContainer>
<Tab.Navigator
screenOptions={({ route }) => ({
tabBarIcon: ({ focused, color, size }) => {
let iconName;
if (route.name === "Home") {
iconName = focused ? "home" : "home-outline";
} else if (route.name === "Transactions") {
iconName = focused ? "swap-vertical" : "swap-vertical-outline";
} else if (route.name === "Profiles") {
iconName = focused ? "person-circle" : "person-circle-outline";
}
return <Ionicons name={iconName as "home" | "home-outline" | "swap-vertical" | "swap-vertical-outline" | "person-circle" | "person-circle-outline"} size={size} color={color} />;
},
headerShown: false,
tabBarActiveTintColor: "#3164FA",
tabBarInactiveTintColor: "#7E8492",
tabBarStyle: {
display: "flex",
height: 80,
},
})}
>
<Tab.Screen name="Home" component={HomeScreen} />
<Tab.Screen name="Transactions" component={TransactionScreen} />
<Tab.Screen name="Profiles" component={ProfileScreen} />
</Tab.Navigator>
</NavigationContainer>
</TamaguiProvider>
);
}
export default App;