-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
59 lines (55 loc) · 2.02 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-native-gesture-handler";
import { StatusBar } from "expo-status-bar";
import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
import { createDrawerNavigator } from "@react-navigation/drawer";
import { NavigationContainer } from "@react-navigation/native";
import HomeScreen from "./src/screens/HomeScreen";
import NationalInfoScreen from "./src/screens/NationalInfoScreen";
import { Ionicons } from "@expo/vector-icons";
import GovernmentInfoScreen from "./src/screens/GovermentInfoScreen";
import CustomDrawerContent from "./src/components/CustomDrawerContent";
import HistoryScreen from "./src/screens/HistoryScreen";
import ImportantDaysScreen from "./src/screens/ImportantDaysScreen";
const Drawer = createDrawerNavigator();
export default function App() {
return (
<NavigationContainer>
<Drawer.Navigator
screenOptions={({ navigation }) => ({
headerStyle: { backgroundColor: "#028751" },
headerTintColor: "white",
drawerActiveTintColor: "#028751",
headerLeft: () => (
<TouchableOpacity
onPress={() => navigation.toggleDrawer()}
style={styles.drawerIcon}
>
<Ionicons name="menu" size={25} color="#fff" />
</TouchableOpacity>
),
})}
// drawerContent={(props) => <CustomDrawerContent {...props} />}
>
<Drawer.Screen name="Know Naija" component={HomeScreen} />
<Drawer.Screen name="Government" component={GovernmentInfoScreen} />
<Drawer.Screen name="History" component={HistoryScreen} />
<Drawer.Screen
name="National Information"
component={NationalInfoScreen}
/>
<Drawer.Screen name="Important Days" component={ImportantDaysScreen} />
</Drawer.Navigator>
</NavigationContainer>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#028751",
alignItems: "center",
justifyContent: "center",
},
drawerIcon: {
marginLeft: 10,
},
});