-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
61 lines (55 loc) · 1.78 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
60
61
import { StatusBar } from "expo-status-bar";
import { Text, View } from "react-native";
// amplify
import { Amplify } from "aws-amplify";
import amplifyconfig from "./src/amplifyconfiguration.json";
Amplify.configure(amplifyconfig);
// navigation
import { NavigationContainer } from "@react-navigation/native";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
// icon
import { Ionicons } from "@expo/vector-icons";
// screen
import HomeScreen from "./app/screens/HomeScreen";
import UserScreen from "./app/screens/UserScreen";
const Tab = createBottomTabNavigator();
export default function App() {
return (
<NavigationContainer>
<StatusBar style="light" />
<Tab.Navigator
screenOptions={{
tabBarActiveTintColor: "#ffffff",
tabBarInactiveTintColor: "gray",
tabBarStyle: { backgroundColor: "#000000", borderTopWidth: 0 }, // ボトムタブのボーダー削除
headerStyle: {
backgroundColor: "#000000", // ヘッダーの背景色
borderBottomWidth: 0, // ヘッダーのボーダー削除
},
headerTintColor: "#fff", // ヘッダータイトルの色
}}
>
<Tab.Screen
name="Home"
component={HomeScreen}
options={{
title: "Home",
tabBarIcon: ({ color, size }) => (
<Ionicons name="home" size={size} color={color} />
),
}}
/>
<Tab.Screen
name="User"
component={UserScreen}
options={{
title: "Setting",
tabBarIcon: ({ color, size }) => (
<Ionicons name="person" size={size} color={color} />
),
}}
/>
</Tab.Navigator>
</NavigationContainer>
);
}