fln-espranza 0.0.27 → 0.0.29

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.
@@ -48,7 +48,7 @@ const EOption = ({
48
48
  activeOpacity={0.7}
49
49
  {...props}
50
50
  >
51
- {imageSource !== "" && (
51
+ {imageSource ? (
52
52
  <View
53
53
  style={[
54
54
  tw`${MediaContainerStyle}`,
@@ -80,7 +80,9 @@ const EOption = ({
80
80
  resizeMode="contain"
81
81
  />
82
82
  </View>
83
- )}
83
+ )
84
+ : <></>
85
+ }
84
86
  {text ? (
85
87
  <EText
86
88
  size={"base"}
@@ -1,25 +1,22 @@
1
1
  import React from 'react'
2
2
  import { Dimensions, TouchableOpacity, View } from 'react-native'
3
- import { ChevronRightIcon } from 'react-native-heroicons/solid';
4
3
  import tw from '../lib/tailwind'
5
4
  import { Colors } from '../utils/Color';
6
5
  import EBadge from './EBadge'
7
- import EButton from './EButton';
8
- import EDateAndTimeCard from './EDateAndTimeCard'
9
6
  import EText from './EText';
10
- import EIconAdd from './icons/EIconAdd';
7
+ import EIconChevronRight from './icons/EIconChevronRight';
11
8
 
12
9
  interface IProps {
13
10
  title: string;
14
11
  description: string;
15
12
  completed: boolean;
16
- anotherButton?: boolean;
17
13
  onPress?: () => void;
18
- onAnotherButtonPress?: () => void;
14
+ buttonText?: string;
19
15
  disabled: boolean;
16
+ badgeText?: string;
20
17
  }
21
18
 
22
- export default function ETimeLineCard({ title, description, completed, anotherButton, disabled, onPress, onAnotherButtonPress }: IProps) {
19
+ export default function ETimeLineCard({ title, description, completed, disabled, onPress, buttonText, badgeText }: IProps) {
23
20
  return (
24
21
  <TouchableOpacity
25
22
  onPress={() => onPress && onPress()}
@@ -43,29 +40,26 @@ export default function ETimeLineCard({ title, description, completed, anotherBu
43
40
  </EText>
44
41
  </View>
45
42
  <View style={tw`ml-4`}>
46
- <ChevronRightIcon style={[tw``, { color: Colors['text-body'] }]} size={16} />
43
+ <EBadge
44
+ completed={completed}
45
+ text={
46
+ badgeText ? badgeText : completed ? "Complete" : "Pending"}
47
+ color={completed ? Colors['primary-base'] : Colors.warning}
48
+ />
47
49
  </View>
48
50
  </View>
49
51
 
50
- <View style={tw`mt-6 flex-row items-center justify-between`}>
51
- <EBadge
52
- completed={completed}
53
- text={completed ? "Complete" : "Pending"}
54
- color={completed ? Colors['primary-base'] : Colors.warning}
55
- />
56
-
57
- {
58
- anotherButton ? (
59
- <TouchableOpacity style={tw`flex-row`} onPress={onAnotherButtonPress}>
52
+ {
53
+ !disabled ? (
54
+ <View style={tw`mt-6 flex-row items-center justify-between`}>
55
+ <TouchableOpacity style={tw`flex-row`} onPress={onPress}>
60
56
  <EText size="sm" style={[tw`ml-2 font-semibold`, { color: Colors['primary-base'] }]}>
61
- Another Assessment
57
+ {buttonText}
62
58
  </EText>
63
- <EIconAdd size={20} style={[tw`ml-2`, { color: Colors['primary-base'] }]} />
59
+ <EIconChevronRight size={20} style={[tw`ml-2`, { color: Colors['primary-base'] }]} />
64
60
  </TouchableOpacity>
65
-
66
- ) : <></>
67
- }
68
- </View>
61
+ </View>) : <></>
62
+ }
69
63
  </TouchableOpacity>
70
64
  )
71
65
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fln-espranza",
3
- "version": "0.0.27",
3
+ "version": "0.0.29",
4
4
  "description": "All components used inside FLN Project of Espranza Innovations",
5
5
  "main": "index.ts",
6
6
  "scripts": {