fln-espranza 0.0.46 → 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.
@@ -8,7 +8,7 @@ interface IProps {
8
8
  stat: string;
9
9
  target: string;
10
10
  label: string;
11
- bgColor?: string;
11
+ statColor?: string;
12
12
  iconR?: JSX.Element;
13
13
  }
14
14
 
@@ -17,48 +17,33 @@ export default function EStat({
17
17
  target,
18
18
  label,
19
19
  iconR,
20
- bgColor
20
+ statColor
21
21
  }: IProps) {
22
22
 
23
23
  const percentage = Math.round((parseFloat(stat) / parseFloat(target)) * 100);
24
- // const textColor = 'text-slate-800';
25
- const textColor = 'text-white';
24
+ const pending = parseFloat(target) - parseFloat(stat);
26
25
 
27
26
  return (
28
27
  <TouchableOpacity
29
- style={[tw`p-4 bg-white rounded-2xl flex-1 `, {
30
- shadowColor: '#155e75',
31
- shadowOffset: { width: 0, height: 6 },
32
- shadowOpacity: 0.25,
33
- shadowRadius: 8,
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,
34
33
  }]}
35
34
  activeOpacity={0.8}
36
35
  >
37
- <ImageBackground
38
- source={require('../assets/images/bg-stat.png')}
39
- resizeMode="cover"
40
- >
41
- <View style={tw`flex-row mb-1`}>
42
- <EText style={tw`text-3xl font-extrabold ${textColor} -tracking-0.25 -mt-1`}>
43
- {stat}
44
- </EText>
45
- <EText size="sm" style={tw`ml-1 pt-1 ${textColor} opacity-50 flex-1 font-medium`}>
46
- / {target}
47
- </EText>
48
- {iconR}
49
- </View>
50
- {/* PROGRESSBAR */}
51
- <View style={tw`flex-row`}>
52
- <View style={tw`bg-slate-200 h-1 rounded-full mb-1 mt-2 overflow-hidden flex-1 mr-3`}>
53
- <View style={[tw`h-1 w-32 bg-teal-400`, { width: percentage }]}></View>
54
- </View>
55
- <EText size="xs" style={tw`text-teal-400 font-bold`}>
56
- {percentage}%
57
- </EText>
58
- </View>
59
- <EText style={tw`font-bold mt-2 ${textColor}`}>{label}</EText>
60
- <EText size="xs" style={tw` ${textColor} opacity-60 font-medium`}>This month</EText>
61
- </ImageBackground>
36
+ <View style={tw` mb-2 flex-row flex-1 justify-center`}>
37
+ <EText style={tw`text-3xl font-bold ${statColor} -tracking-0.25 `}>
38
+ {stat}
39
+ </EText>
40
+ <EText style={tw`ml-0.5 pt-1 text-slate-800 opacity-50 font-semibold -tracking-0.25`}>
41
+ / {target}
42
+ </EText>
43
+ {iconR}
44
+ </View>
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>
62
47
  </TouchableOpacity>
63
48
  );
64
49
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fln-espranza",
3
- "version": "0.0.46",
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": {