fln-espranza 0.0.45 → 0.0.47

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.
Binary file
@@ -1,13 +1,14 @@
1
1
  import React from "react";
2
- import { TouchableOpacity, View } from "react-native";
2
+ import { ImageBackground, TouchableOpacity, View } from "react-native";
3
3
  import tw from "../../../lib/tailwind";
4
4
  import EText from "./EText";
5
+ import { Colors } from "fln-espranza/utils/Color";
5
6
 
6
7
  interface IProps {
7
8
  stat: string;
8
9
  target: string;
9
10
  label: string;
10
- percentage: string;
11
+ statColor?: string;
11
12
  iconR?: JSX.Element;
12
13
  }
13
14
 
@@ -15,27 +16,34 @@ export default function EStat({
15
16
  stat,
16
17
  target,
17
18
  label,
18
- percentage,
19
19
  iconR,
20
+ statColor
20
21
  }: IProps) {
22
+
23
+ const percentage = Math.round((parseFloat(stat) / parseFloat(target)) * 100);
24
+ const pending = parseFloat(target) - parseFloat(stat);
25
+
21
26
  return (
22
27
  <TouchableOpacity
23
- style={tw`p-4 bg-white rounded-lg shadow-lg`}
28
+ style={[tw`bg-slate-00 flex-1 overflow-hidden items-center py-3`, {
29
+ // shadowColor: '#155e75',
30
+ // shadowOffset: { width: 0, height: 8 },
31
+ // shadowOpacity: .1,
32
+ // shadowRadius: 16,
33
+ }]}
24
34
  activeOpacity={0.8}
25
35
  >
26
- <View style={tw`flex-row`}>
27
- <EText style={tw`text-4xl font-extrabold -tracking-0.25`}>
36
+ <View style={tw` mb-2 flex-row flex-1 justify-center`}>
37
+ <EText style={tw`text-3xl font-bold ${statColor} -tracking-0.25 `}>
28
38
  {stat}
29
39
  </EText>
30
- <EText size="sm" style={tw`ml-1 opacity-50 flex-1`}>
40
+ <EText style={tw`ml-0.5 pt-1 text-slate-800 opacity-50 font-semibold -tracking-0.25`}>
31
41
  / {target}
32
42
  </EText>
33
43
  {iconR}
34
44
  </View>
35
- <EText size="sm" style={tw`text-teal-600 font-semibold`}>
36
- {percentage} Complete
37
- </EText>
38
- <EText style={tw`font-semibold mt-3 text-slate-800`}>{label}</EText>
45
+ <EText size="lg" style={tw`font-bold text-slate-700 mb-0.5`}>{label}</EText>
46
+ <EText size="sm" style={tw` text-slate-800 opacity-60`}>{pending} remaining</EText>
39
47
  </TouchableOpacity>
40
48
  );
41
49
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fln-espranza",
3
- "version": "0.0.45",
3
+ "version": "0.0.47",
4
4
  "description": "All components used inside FLN Project of Espranza Innovations",
5
5
  "main": "index.ts",
6
6
  "scripts": {