-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
128 lines (119 loc) · 3.14 KB
/
Copy pathApp.js
File metadata and controls
128 lines (119 loc) · 3.14 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
import React, { useState } from "react";
import { Linking, StyleSheet, View } from "react-native";
import { NavigationContainer } from "@react-navigation/native";
import { createStackNavigator } from "@react-navigation/stack";
import FlatListGridCard from "./app/screens/FlatListGridCard";
import TabNavigationInfo from "./app/screens/RecyclerViewScreens/TabNavigationInfo";
import { FAB } from "react-native-paper";
import DefColors from "./DefColors";
const Stack = createStackNavigator();
export default function App() {
const [charName, setCharName] = useState("ciao");
return (
<NavigationContainer
style={styles.container}
linking={{ enabled: false }}
theme={MyTheme}
>
<Stack.Navigator
screenOptions={{
headerRight: () => <FABpersonal />,
}}
>
<Stack.Screen name="Home">
{(props) => (
<FlatListGridCard
navigation={props.navigation}
setChar={setCharName}
/>
)}
</Stack.Screen>
<Stack.Screen name="Datas" options={() => ({ title: charName })}>
{(props) => <TabNavigationInfo navigation={props.navigation} char={charName} setChar={setCharName} />}
</Stack.Screen>
</Stack.Navigator>
</NavigationContainer>
);
}
function FABpersonal() {
const [state, setState] = React.useState({ open: false });
return (
<View style={styles.viewContainer}>
<FAB
onPress={() => setState(!state)}
title="more"
icon={state ? "plus-circle-multiple" : "minus-circle-multiple"}
style={styles.fabs}
color="#000"
/>
<FAB
onPress={() => {
Linking.openURL("https://twitter.com/Dacrenzio1");
}}
visible={!state}
title="help"
icon="twitter"
style={styles.fabs}
color="#00A0FF"
/>
<FAB
onPress={() => {
Linking.openURL("https://discord.gg/dWnPTmnbXM");
}}
visible={!state}
title="Discord"
icon="discord"
style={styles.fabs}
color="#5865f2"
/>
<FAB
onPress={() => {
Linking.openURL("https://t.co/pNPacF4dWb");
}}
visible={!state}
title="Resource File"
icon="attachment"
style={styles.fabs}
color="#000"
/>
<FAB
onPress={() => {
Linking.openURL("https://paypal.me/dacrenzio");
}}
visible={!state}
title="Donation"
icon={{ uri: "https://cdnlogo.com/logos/p/42/paypal-icon.svg" }}
style={styles.fabs}
color="#00A0FF"
/>
</View>
);
}
const MyTheme = {
dark: false,
colors: {
primary: "#5efcff",
background: "#222222",
card: "#8f208f",
text: "#fff",
border: "rgb(0, 0, 0)",
},
};
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: "center",
alignContent: "center",
},
fabs: {
justifyContent: "center",
borderRadius: 20,
margin: 5,
backgroundColor: DefColors.primaryRow,
},
viewContainer: {
flexDirection: "row-reverse",
flex: 1,
justifyContent: "center",
},
});