fln-espranza 0.0.26 → 0.0.27

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.
@@ -12,32 +12,34 @@ import { Colors } from "../utils/Color";
12
12
 
13
13
  const ImageWidth = Dimensions.get("window").width / 2 - 18;
14
14
  const ContentWidth = Dimensions.get("window").width - 32;
15
- const ImageHeight = 120;
15
+ const ImageHeight = 140;
16
16
  const MediaContainerStyle = "rounded-md overflow-hidden";
17
17
 
18
18
  interface RadioButtonProps extends TouchableOpacityProps {
19
19
  text?: string;
20
20
  isActive: boolean;
21
21
  imageSource?: string;
22
+ optionLabel: string;
22
23
  onPress?: () => void;
23
24
  }
24
25
  const EOption = ({
25
26
  isActive,
26
27
  text,
27
28
  imageSource,
29
+ optionLabel,
28
30
  onPress,
29
31
  ...props
30
32
  }: RadioButtonProps) => {
31
33
  return (
32
34
  <TouchableOpacity
33
35
  style={[
34
- tw`flex flex-row justify-start items-center mt-1 px-4 py-3 border rounded-lg ${
36
+ tw`flex flex-row justify-start items-center mt-2 px-4 py-3 border rounded-lg ${
35
37
  imageSource ? "flex-col p-0 items-start" : ""
36
38
  }`,
37
39
  {
38
40
  borderColor: isActive ? Colors["secondary-base"] : Colors.border,
39
41
  backgroundColor: isActive ? Colors["secondary-light"] : Colors.white,
40
- width: imageSource ? ImageWidth : ContentWidth,
42
+ width: imageSource ? ImageWidth - 10 : ContentWidth,
41
43
  },
42
44
  ]}
43
45
  onPress={() => {
@@ -51,22 +53,31 @@ const EOption = ({
51
53
  style={[
52
54
  tw`${MediaContainerStyle}`,
53
55
  {
54
- height: ImageHeight,
55
- width: ImageWidth - 2,
56
- backgroundColor: Colors["secondary-base"],
56
+ height: ImageHeight - 20,
57
+ width: ImageWidth - 12,
58
+ backgroundColor: Colors.white
57
59
  },
58
60
  ]}
59
61
  >
62
+ <View
63
+ style={[
64
+ tw`h-8 w-8 bg-slate-300 rounded-full justify-center items-center m-2 absolute z-10`,
65
+ ]}
66
+ >
67
+ <EText size={"base"} style={tw`font-normal`}>
68
+ {optionLabel}
69
+ </EText>
70
+ </View>
60
71
  <Image
61
72
  style={[
62
- tw`h-full w-full`,
73
+ tw`w-full mt-4`,
63
74
  {
64
75
  opacity: isActive ? 0.5 : 1,
65
76
  },
77
+ {height: ImageHeight - 40}
66
78
  ]}
67
- source={{
68
- uri: imageSource ,
69
- }}
79
+ source={{uri: imageSource}}
80
+ resizeMode="contain"
70
81
  />
71
82
  </View>
72
83
  )}
@@ -1,4 +1,3 @@
1
- import { EIconAdd } from 'fln-espranza';
2
1
  import React from 'react'
3
2
  import { Dimensions, TouchableOpacity, View } from 'react-native'
4
3
  import { ChevronRightIcon } from 'react-native-heroicons/solid';
@@ -7,7 +6,8 @@ import { Colors } from '../utils/Color';
7
6
  import EBadge from './EBadge'
8
7
  import EButton from './EButton';
9
8
  import EDateAndTimeCard from './EDateAndTimeCard'
10
- import EText from './EText'
9
+ import EText from './EText';
10
+ import EIconAdd from './icons/EIconAdd';
11
11
 
12
12
  interface IProps {
13
13
  title: string;
@@ -16,19 +16,21 @@ interface IProps {
16
16
  anotherButton?: boolean;
17
17
  onPress?: () => void;
18
18
  onAnotherButtonPress?: () => void;
19
+ disabled: boolean;
19
20
  }
20
21
 
21
- export default function ETimeLineCard({ title, description, completed, anotherButton, onPress, onAnotherButtonPress }: IProps) {
22
+ export default function ETimeLineCard({ title, description, completed, anotherButton, disabled, onPress, onAnotherButtonPress }: IProps) {
22
23
  return (
23
24
  <TouchableOpacity
24
- onPress={() => onPress && onPress()}
25
+ onPress={() => onPress && onPress()}
25
26
  style={[
26
27
  tw` rounded-lg p-4 mb-3 w-full border border}`,
27
28
  {
28
- backgroundColor: completed ? Colors['primary-light'] : Colors['white'],
29
+ backgroundColor: completed ? Colors['primary-light'] : Colors['white'],
29
30
  borderColor: completed ? Colors['primary-base'] : Colors['border'],
30
31
  }
31
32
  ]}
33
+ disabled={disabled}
32
34
  >
33
35
 
34
36
  <View style={tw`flex-row justify-between `}>
@@ -36,12 +38,12 @@ export default function ETimeLineCard({ title, description, completed, anotherBu
36
38
  <EText size="lg" style={[tw`font-bold`, { color: Colors['text-primary'] }]}>
37
39
  {title}
38
40
  </EText>
39
- <EText size='sm' style={[tw`font-normal mt-1`, {color: Colors['text-body']}]}>
41
+ <EText size='sm' style={[tw`font-normal mt-1`, { color: Colors['text-body'] }]}>
40
42
  {description}
41
43
  </EText>
42
44
  </View>
43
45
  <View style={tw`ml-4`}>
44
- <ChevronRightIcon style={[tw``,{ color: Colors['text-body']}]} size={16} />
46
+ <ChevronRightIcon style={[tw``, { color: Colors['text-body'] }]} size={16} />
45
47
  </View>
46
48
  </View>
47
49
 
@@ -55,13 +57,13 @@ export default function ETimeLineCard({ title, description, completed, anotherBu
55
57
  {
56
58
  anotherButton ? (
57
59
  <TouchableOpacity style={tw`flex-row`} onPress={onAnotherButtonPress}>
58
- <EText size="sm" style={[tw`ml-2 font-semibold`, {color: Colors['primary-base']}]}>
60
+ <EText size="sm" style={[tw`ml-2 font-semibold`, { color: Colors['primary-base'] }]}>
59
61
  Another Assessment
60
62
  </EText>
61
- <EIconAdd size={20} style={[tw`ml-2`, {color: Colors['primary-base']}]}/>
63
+ <EIconAdd size={20} style={[tw`ml-2`, { color: Colors['primary-base'] }]} />
62
64
  </TouchableOpacity>
63
-
64
- ) : <></>
65
+
66
+ ) : <></>
65
67
  }
66
68
  </View>
67
69
  </TouchableOpacity>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fln-espranza",
3
- "version": "0.0.26",
3
+ "version": "0.0.27",
4
4
  "description": "All components used inside FLN Project of Espranza Innovations",
5
5
  "main": "index.ts",
6
6
  "scripts": {