fln-espranza 0.0.44 → 0.0.45
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/EStat.tsx +28 -11
- package/package.json +1 -1
package/components/EStat.tsx
CHANGED
|
@@ -1,24 +1,41 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { View } from "react-native";
|
|
2
|
+
import { TouchableOpacity, View } from "react-native";
|
|
3
3
|
import tw from "../../../lib/tailwind";
|
|
4
4
|
import EText from "./EText";
|
|
5
5
|
|
|
6
6
|
interface IProps {
|
|
7
7
|
stat: string;
|
|
8
|
+
target: string;
|
|
8
9
|
label: string;
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
percentage: string;
|
|
11
|
+
iconR?: JSX.Element;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
export default function EStat({
|
|
14
|
+
export default function EStat({
|
|
15
|
+
stat,
|
|
16
|
+
target,
|
|
17
|
+
label,
|
|
18
|
+
percentage,
|
|
19
|
+
iconR,
|
|
20
|
+
}: IProps) {
|
|
14
21
|
return (
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
{
|
|
18
|
-
|
|
19
|
-
<
|
|
20
|
-
{
|
|
22
|
+
<TouchableOpacity
|
|
23
|
+
style={tw`p-4 bg-white rounded-lg shadow-lg`}
|
|
24
|
+
activeOpacity={0.8}
|
|
25
|
+
>
|
|
26
|
+
<View style={tw`flex-row`}>
|
|
27
|
+
<EText style={tw`text-4xl font-extrabold -tracking-0.25`}>
|
|
28
|
+
{stat}
|
|
29
|
+
</EText>
|
|
30
|
+
<EText size="sm" style={tw`ml-1 opacity-50 flex-1`}>
|
|
31
|
+
/ {target}
|
|
32
|
+
</EText>
|
|
33
|
+
{iconR}
|
|
34
|
+
</View>
|
|
35
|
+
<EText size="sm" style={tw`text-teal-600 font-semibold`}>
|
|
36
|
+
{percentage} Complete
|
|
21
37
|
</EText>
|
|
22
|
-
|
|
38
|
+
<EText style={tw`font-semibold mt-3 text-slate-800`}>{label}</EText>
|
|
39
|
+
</TouchableOpacity>
|
|
23
40
|
);
|
|
24
41
|
}
|