-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
66 lines (62 loc) · 1.66 KB
/
App.js
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
62
63
64
65
66
import { NavigationContainer, useNavigation } from "@react-navigation/native";
import { createStackNavigator } from "@react-navigation/stack";
import { StyleSheet, View, TouchableOpacity } from "react-native";
import { MaterialIcons } from "@expo/vector-icons";
import React from "react";
import Header from "./src/Screens/Header";
import Settings from "./src/Screens/Settings";
import Message from "./src/Screens/Message";
const Stack = createStackNavigator();
const SettingItem = () => {
const navigation = useNavigation();
return (
<View>
<TouchableOpacity
style={{ marginLeft: 20, marginRight: 15 }}
onPress={() => navigation.navigate("Settings")}
>
<MaterialIcons name="settings" size={28} color="#000" />
</TouchableOpacity>
</View>
);
};
const App = () => {
return (
<Stack.Navigator>
<Stack.Screen
name="Bulk-Message"
component={Message}
options={{
headerTitle: () => <Header name="Bulk Message" />,
headerRight: () => <SettingItem />,
headerStyle: styles.headerStyle,
}}
/>
<Stack.Screen
name="Settings"
component={Settings}
options={{
headerTitle: () => <Header name="Settings" />,
headerStyle: styles.headerStyle,
}}
/>
</Stack.Navigator>
);
};
const styles = StyleSheet.create({
headerStyle: {
height: 100,
borderBottomLeftRadius: 0, //50
borderBottomRightRadius: 0, //50
elevation: 25,
backgroundColor: "#8ad24e",
shadowColor: "#fff",
},
});
export default () => {
return (
<NavigationContainer>
<App />
</NavigationContainer>
);
};