fln-espranza 0.0.37 → 0.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Drawer.tsx +32 -23
- package/components/EStat.tsx +22 -0
- package/package.json +1 -1
package/components/Drawer.tsx
CHANGED
|
@@ -24,7 +24,15 @@ interface IProps {
|
|
|
24
24
|
logout?: () => void;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
const Drawer = ({
|
|
27
|
+
const Drawer = ({
|
|
28
|
+
name,
|
|
29
|
+
profile,
|
|
30
|
+
menuItems,
|
|
31
|
+
navigation,
|
|
32
|
+
secondMenuItemsTitle,
|
|
33
|
+
secondMenuItems,
|
|
34
|
+
logout,
|
|
35
|
+
}: IProps) => {
|
|
28
36
|
return (
|
|
29
37
|
<ScrollView
|
|
30
38
|
scrollEnabled={true}
|
|
@@ -75,28 +83,29 @@ const Drawer = ({ name, profile, menuItems, navigation, secondMenuItemsTitle, se
|
|
|
75
83
|
);
|
|
76
84
|
})}
|
|
77
85
|
|
|
78
|
-
{secondMenuItemsTitle
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
86
|
+
{secondMenuItemsTitle ? (
|
|
87
|
+
<View style={tw`mt-8 mb-1`}>
|
|
88
|
+
<EText size="xs" style={tw`text-slate-400 font-semibold`}>
|
|
89
|
+
My Cluster
|
|
90
|
+
</EText>
|
|
91
|
+
</View>
|
|
92
|
+
) : (
|
|
93
|
+
<></>
|
|
94
|
+
)}
|
|
95
|
+
{secondMenuItems && secondMenuItems?.length > 0 ? (
|
|
96
|
+
secondMenuItems.map((item, index) => {
|
|
97
|
+
return (
|
|
98
|
+
<MenuItems
|
|
99
|
+
key={index}
|
|
100
|
+
title={item.title}
|
|
101
|
+
icon={item.icon}
|
|
102
|
+
onPress={() => navigation.navigate(item.screen)}
|
|
103
|
+
/>
|
|
104
|
+
);
|
|
105
|
+
})
|
|
106
|
+
) : (
|
|
107
|
+
<></>
|
|
108
|
+
)}
|
|
100
109
|
|
|
101
110
|
<MenuItems
|
|
102
111
|
title={"Logout"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
3
|
+
import tw from "../../../lib/tailwind";
|
|
4
|
+
import EText from "./EText";
|
|
5
|
+
|
|
6
|
+
interface IProps {
|
|
7
|
+
stat: string;
|
|
8
|
+
label: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default function EStat({ stat, label }: IProps) {
|
|
12
|
+
return (
|
|
13
|
+
<View style={tw`items-center flex-1 mx-2`}>
|
|
14
|
+
<EText size="xl" style={tw`font-bold text-cyan-400`}>
|
|
15
|
+
{stat}
|
|
16
|
+
</EText>
|
|
17
|
+
<EText size="xs" style={tw`text-center text-white/60 font-medium`}>
|
|
18
|
+
{label}
|
|
19
|
+
</EText>
|
|
20
|
+
</View>
|
|
21
|
+
);
|
|
22
|
+
}
|