fln-espranza 1.1.7 → 1.1.9

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.
@@ -27,9 +27,9 @@ export default function EProfile({ name, subjectName, border, children, titleSiz
27
27
  />
28
28
  <View style={tw`ml-3`}>
29
29
  <EText style={[tw`${titleSize}`, { color: Colors['text-primary'] }]}>{name}</EText>
30
- <EText style={[tw`mt-1 ${subTitleSize}`, { color: Colors['text-body'] }]}>
30
+ {subjectName ? <EText style={[tw`mt-1 ${subTitleSize}`, { color: Colors['text-body'] }]}>
31
31
  {subjectName}
32
- </EText>
32
+ </EText> : null}
33
33
  </View>
34
34
  </View>
35
35
  {
@@ -0,0 +1,33 @@
1
+ import React, { useEffect, useRef, useState } from 'react'
2
+ import { Animated,StyleSheet, View } from 'react-native';
3
+ import tw from "../lib/tailwind";
4
+ import { Colors } from "../utils/Color";
5
+
6
+ interface IProps{
7
+ progress: number;
8
+ }
9
+
10
+ export default function ProgressBar( {progress}: IProps) {
11
+
12
+
13
+ const barWidth = useRef(new Animated.Value(0)).current;
14
+
15
+ useEffect(() => {
16
+ Animated.spring(barWidth, {
17
+ toValue: progress,
18
+ bounciness: 0,
19
+ speed: 1,
20
+ useNativeDriver: false,
21
+ }).start();
22
+ }, [progress]);
23
+ return (
24
+ <View style={[tw`h-2 w-14 bg-[${Colors['primary-light']}] overflow-hidden mr-2`, {
25
+ borderRadius: 40,
26
+ }]}>
27
+ <Animated.View
28
+ style={[StyleSheet.absoluteFill, { backgroundColor: Colors['primary-base'], width: barWidth }]}
29
+
30
+ />
31
+ </View>
32
+ )
33
+ }
@@ -3,11 +3,12 @@ import React from "react";
3
3
  import tw from '../lib/tailwind'
4
4
 
5
5
  export default function Spacer(props: any) {
6
- const { sm, lg, xs } = props;
6
+ const { sm, lg, xs, md } = props;
7
7
  return <View style={tw.style(
8
8
  "my-4",
9
9
  xs && "my-1",
10
10
  sm && "my-2",
11
+ md && "my-3",
11
12
  lg && "my-6"
12
13
  )} />;
13
14
  }
@@ -26,6 +26,7 @@ import ModalLayout from "./ModalLayout";
26
26
  import PageHeader from "./PageHeader";
27
27
  import PageHeaderSecondary from "./PageHeaderSecondary";
28
28
  import Spacer from "./Spacer";
29
+ import ProgressBar from "./ProgressBar";
29
30
 
30
31
  export {
31
32
  Avatar,
@@ -55,7 +56,8 @@ export {
55
56
  EPillButton,
56
57
  EProfile,
57
58
  SecondaryBaseLayout,
58
- Timer
59
+ Timer,
60
+ ProgressBar
59
61
 
60
62
 
61
63
  };
package/index.ts CHANGED
@@ -27,6 +27,7 @@ import PageHeader from "./components/PageHeader";
27
27
  import PageHeaderSecondary from "./components/PageHeaderSecondary";
28
28
  import Spacer from "./components/Spacer";
29
29
  import { Colors } from "./utils/Color";
30
+ import ProgressBar from "./components/ProgressBar";
30
31
 
31
32
  export {
32
33
  Avatar,
@@ -57,6 +58,7 @@ export {
57
58
  EProfile,
58
59
  SecondaryBaseLayout,
59
60
  Timer,
61
+ ProgressBar,
60
62
  Colors
61
63
 
62
64
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fln-espranza",
3
- "version": "1.1.7",
3
+ "version": "1.1.9",
4
4
  "description": "All components used inside FLN Project of Espranza Innovations",
5
5
  "main": "index.ts",
6
6
  "scripts": {