fln-espranza 1.1.6 → 1.1.8
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.
- package/components/Drawer.tsx +31 -26
- package/components/EDateAndTimeCard.tsx +2 -2
- package/components/EProfile.tsx +2 -2
- package/components/PageHeader.tsx +5 -5
- package/components/ProgressBar.tsx +33 -0
- package/components/SecondaryBaseLayout.tsx +2 -2
- package/components/Spacer.tsx +2 -1
- package/components/index.tsx +3 -1
- package/package.json +1 -1
package/components/Drawer.tsx
CHANGED
|
@@ -9,16 +9,29 @@ import Avatar from "./Avatar";
|
|
|
9
9
|
import { Colors } from "../utils/Color";
|
|
10
10
|
import MenuItems from "./MenuItems";
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
type menuItems = {
|
|
13
|
+
title: string,
|
|
14
|
+
icon: any,
|
|
15
|
+
screen: string,
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface IProps{
|
|
19
|
+
name: string,
|
|
20
|
+
profile: string,
|
|
21
|
+
menuItems: menuItems[];
|
|
22
|
+
navigation: any;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const Drawer = ({name,profile, menuItems,navigation }: IProps) => {
|
|
13
26
|
return (
|
|
14
27
|
<ScrollView
|
|
15
28
|
scrollEnabled={true}
|
|
16
29
|
showsVerticalScrollIndicator={false}
|
|
17
30
|
style={{
|
|
18
31
|
position: 'relative',
|
|
19
|
-
backgroundColor: '#
|
|
32
|
+
backgroundColor: '#ffffff',
|
|
20
33
|
}}>
|
|
21
|
-
<View style={tw`mx-4`}>
|
|
34
|
+
<View style={tw`mx-4 pt-4`}>
|
|
22
35
|
<Spacer height={30} />
|
|
23
36
|
|
|
24
37
|
<View style={tw`flex w-full mt-5`}>
|
|
@@ -26,41 +39,33 @@ const Drawer = ({ navigation }: any) => {
|
|
|
26
39
|
<Avatar
|
|
27
40
|
size="sm"
|
|
28
41
|
source={""}
|
|
29
|
-
nameFirstLetter={"
|
|
42
|
+
nameFirstLetter={name?.split("")[0]}
|
|
30
43
|
bg={"sky-400"}
|
|
31
44
|
/>
|
|
32
45
|
<View style={tw`ml-3`}>
|
|
33
|
-
<EText size={"xl"} style={tw`font-bold -mt-1`}>{
|
|
46
|
+
<EText size={"xl"} style={tw`font-bold -mt-1`}>{name}</EText>
|
|
34
47
|
<EText size="sm" style={[tw`font-normal`, {
|
|
35
48
|
color: Colors["text-body"]
|
|
36
49
|
}]}>
|
|
37
|
-
{
|
|
50
|
+
{profile}
|
|
38
51
|
</EText>
|
|
39
52
|
</View>
|
|
40
53
|
</View>
|
|
41
54
|
</View>
|
|
42
55
|
|
|
43
56
|
<Spacer height={30} />
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
<MenuItems
|
|
57
|
-
title={"Mentoring Resources"}
|
|
58
|
-
icon={<ViewBoardsIcon style={[tw`w-6 h-6`, { color: Colors["primary-base"] }]} />}
|
|
59
|
-
/>
|
|
60
|
-
<MenuItems
|
|
61
|
-
title={"Cluster Performance"}
|
|
62
|
-
icon={<TemplateIcon style={[tw`w-6 h-6`, { color: Colors["primary-base"] }]} />}
|
|
63
|
-
/>
|
|
57
|
+
{
|
|
58
|
+
menuItems.map((item, index) => {
|
|
59
|
+
return (
|
|
60
|
+
<MenuItems
|
|
61
|
+
key={index}
|
|
62
|
+
title={item.title}
|
|
63
|
+
icon={item.icon}
|
|
64
|
+
onPress={() => navigation.navigate(item.screen)}
|
|
65
|
+
/>
|
|
66
|
+
)
|
|
67
|
+
})
|
|
68
|
+
}
|
|
64
69
|
<Spacer />
|
|
65
70
|
<Spacer />
|
|
66
71
|
<MenuItems
|
|
@@ -36,10 +36,10 @@ export default function EDateAndTimeCard( {date, month, day, time}: IProps) {
|
|
|
36
36
|
{day}
|
|
37
37
|
</EText>
|
|
38
38
|
<View style={tw`flex-row justify-center items-center mt-2`}>
|
|
39
|
-
<ClockIcon size={
|
|
39
|
+
<ClockIcon size={14} style={tw`text-slate-400`} />
|
|
40
40
|
<EText
|
|
41
41
|
size="sm"
|
|
42
|
-
style={tw`ml-
|
|
42
|
+
style={tw`ml-0.5 text-slate-400 font-medium`}
|
|
43
43
|
>
|
|
44
44
|
{time}
|
|
45
45
|
</EText>
|
package/components/EProfile.tsx
CHANGED
|
@@ -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
|
{
|
|
@@ -50,7 +50,7 @@ export default function PageHeader({
|
|
|
50
50
|
return (
|
|
51
51
|
<View style={[tw`${curved ? "-mb-2" : ""} ${border ? "border-b border-slate-300" : ""} `, {}]}>
|
|
52
52
|
<View style={tw`overflow-hidden`}>
|
|
53
|
-
{curved ? (
|
|
53
|
+
{/* curved ? (
|
|
54
54
|
<Image
|
|
55
55
|
resizeMode="cover"
|
|
56
56
|
// source={require("../assets/images/bg-header.jpg")}
|
|
@@ -59,7 +59,7 @@ export default function PageHeader({
|
|
|
59
59
|
{ width: SCREEN_WIDTH, borderBottomRightRadius: 32 },
|
|
60
60
|
]}
|
|
61
61
|
/>
|
|
62
|
-
|
|
62
|
+
) : null */}
|
|
63
63
|
<Animated.View
|
|
64
64
|
style={[
|
|
65
65
|
tw`flex-row pr-4 pl-3 pb-3`,
|
|
@@ -76,7 +76,7 @@ export default function PageHeader({
|
|
|
76
76
|
{menuButton ?
|
|
77
77
|
<MenuIcon
|
|
78
78
|
onPress={() => navigation?.openDrawer()}
|
|
79
|
-
size={
|
|
79
|
+
size={24}
|
|
80
80
|
// onPress={() => navigation.navigate("Dashboard")}
|
|
81
81
|
style={tw`text-slate-900 mt-2`}
|
|
82
82
|
/>
|
|
@@ -84,7 +84,7 @@ export default function PageHeader({
|
|
|
84
84
|
|
|
85
85
|
<EButtonIcon
|
|
86
86
|
iconColor={curved ? "white" : "tint-slate-900"}
|
|
87
|
-
size={
|
|
87
|
+
size={24}
|
|
88
88
|
// onPress={() => navigation.navigate("Dashboard")}
|
|
89
89
|
onPress={() => navigation.goBack()}
|
|
90
90
|
/>
|
|
@@ -92,7 +92,7 @@ export default function PageHeader({
|
|
|
92
92
|
</Animated.View>
|
|
93
93
|
<View style={tw`flex-1 items-center`}>
|
|
94
94
|
<EText
|
|
95
|
-
size="
|
|
95
|
+
size="base"
|
|
96
96
|
style={tw.style("text-black font-semibold ", curved && "text-white ")}
|
|
97
97
|
>
|
|
98
98
|
{title}
|
|
@@ -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
|
+
}
|
|
@@ -61,7 +61,7 @@ export default function SecondaryBaseLayout({
|
|
|
61
61
|
{/* HEADER */}
|
|
62
62
|
<View
|
|
63
63
|
style={[
|
|
64
|
-
tw`absolute top-0 right-0 left-0
|
|
64
|
+
tw`absolute top-0 right-0 left-0 pt-2 z-10 w-full bg-white ${title ? 'mb-1' : 'pb-0'}`,
|
|
65
65
|
// {height: 64},
|
|
66
66
|
]}
|
|
67
67
|
>
|
|
@@ -93,7 +93,7 @@ export default function SecondaryBaseLayout({
|
|
|
93
93
|
>
|
|
94
94
|
{children}
|
|
95
95
|
</ScrollView>
|
|
96
|
-
{bottomButton ? <View style={tw` px-4 mb-
|
|
96
|
+
{bottomButton ? <View style={tw` px-4 mb-6 `}>
|
|
97
97
|
{bottomButton}
|
|
98
98
|
</View> : <></>}
|
|
99
99
|
</View>
|
package/components/Spacer.tsx
CHANGED
|
@@ -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
|
}
|
package/components/index.tsx
CHANGED
|
@@ -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
|
};
|