-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
60 lines (54 loc) · 1.77 KB
/
App.js
File metadata and controls
60 lines (54 loc) · 1.77 KB
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
import 'react-native-gesture-handler';
import * as React from 'react';
import { NavigationContainer } from "@react-navigation/native";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import Icon from "react-native-vector-icons/FontAwesome";
import Day from './components/Day/Day';
import Week from './components/Week/Week';
function HomeScreen(){
return(
<Day nav={Tab}/>
);
}
function DetailScreen(){
return (
<Week/>
);
}
const Tab = createBottomTabNavigator();
function App(){
return(
<NavigationContainer>
<Tab.Navigator initialRouteName="Home"
tabBarOptions={{
activeTintColor: 'yellow',
activeBackgroundColor: 'rgba(0, 0, 0, 0.7)',
inactiveBackgroundColor: 'rgba(0, 0, 0, 0.7)',
style: {
backgroundColor: 'rgba(0, 0, 0, 0.7)'
}
}}
>
<Tab.Screen
name="Home" component={HomeScreen}
options={{
tabBarLabel: "Today",
tabBarIcon: ({ color, size}) => (
<Icon name="th-list" color={color} size={size}/>
),
}}
/>
<Tab.Screen
name="Week" component={DetailScreen}
options={{
tabBarLabel: "This Week",
tabBarIcon: ({ color, size}) => (
<Icon name="th" color={color} size={size}/>
),
}}
/>
</Tab.Navigator>
</NavigationContainer>
);
}
export default App;