fln-espranza 0.0.4 → 0.0.5
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/Avatar.tsx +1 -1
- package/components/Drawer.tsx +27 -13
- package/components/EButton.tsx +2 -4
- package/components/ELabel.tsx +1 -1
- package/components/EListPerson.tsx +1 -1
- package/components/EPillButton.tsx +24 -17
- package/components/{ProgressBar.tsx → EProgressBar.tsx} +4 -4
- package/components/EText.tsx +1 -1
- package/components/SecondaryBaseLayout.tsx +2 -2
- package/components/index.tsx +1 -1
- package/index.ts +1 -1
- package/package.json +1 -1
package/components/Avatar.tsx
CHANGED
|
@@ -36,7 +36,7 @@ export default function Avatar({ size, source, nameFirstLetter, textColor }: Ava
|
|
|
36
36
|
)}
|
|
37
37
|
>
|
|
38
38
|
{source ? <Image style={tw`w-full h-full `} source={source} /> :
|
|
39
|
-
<EText style={tw`text-
|
|
39
|
+
<EText style={tw`text-xl font-bold text-white`}>{nameFirstLetter}</EText>}
|
|
40
40
|
</View>
|
|
41
41
|
);
|
|
42
42
|
}
|
package/components/Drawer.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ScrollView, View, TouchableOpacity } from "react-native";
|
|
3
|
-
import { HomeIcon,CalendarIcon, TemplateIcon, ViewBoardsIcon } from 'react-native-heroicons/solid';
|
|
3
|
+
import { HomeIcon, CalendarIcon, TemplateIcon, ViewBoardsIcon } from 'react-native-heroicons/solid';
|
|
4
4
|
import { StyleSheet } from 'react-native';
|
|
5
5
|
import tw from "../lib/tailwind";
|
|
6
6
|
import EText from "./EText";
|
|
@@ -10,19 +10,20 @@ import { Colors } from "../utils/Color";
|
|
|
10
10
|
import MenuItems from "./MenuItems";
|
|
11
11
|
|
|
12
12
|
type menuItems = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
13
|
+
title: string,
|
|
14
|
+
icon: any,
|
|
15
|
+
screen: string,
|
|
16
|
+
}
|
|
17
17
|
|
|
18
|
-
interface IProps{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
interface IProps {
|
|
19
|
+
name: string,
|
|
20
|
+
profile: string,
|
|
21
|
+
menuItems: menuItems[];
|
|
22
|
+
menuItems2?: menuItems[];
|
|
23
|
+
navigation: any;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
|
-
const Drawer = ({name,profile, menuItems,navigation }: IProps) => {
|
|
26
|
+
const Drawer = ({ name, profile, menuItems, menuItems2, navigation }: IProps) => {
|
|
26
27
|
return (
|
|
27
28
|
<ScrollView
|
|
28
29
|
scrollEnabled={true}
|
|
@@ -67,7 +68,7 @@ const Drawer = ({name,profile, menuItems,navigation }: IProps) => {
|
|
|
67
68
|
}
|
|
68
69
|
<Spacer />
|
|
69
70
|
<Spacer />
|
|
70
|
-
<MenuItems
|
|
71
|
+
{/* <MenuItems
|
|
71
72
|
title="Profile"
|
|
72
73
|
onPress={() => navigation.navigate("ProfileScreen")}
|
|
73
74
|
/>
|
|
@@ -76,7 +77,20 @@ const Drawer = ({name,profile, menuItems,navigation }: IProps) => {
|
|
|
76
77
|
/>
|
|
77
78
|
<MenuItems
|
|
78
79
|
title="Logout"
|
|
79
|
-
/>
|
|
80
|
+
/> */}
|
|
81
|
+
{
|
|
82
|
+
menuItems2?.map((item, index) => {
|
|
83
|
+
return (
|
|
84
|
+
<MenuItems
|
|
85
|
+
key={index}
|
|
86
|
+
title={item.title}
|
|
87
|
+
icon={item.icon}
|
|
88
|
+
onPress={() => navigation.navigate(item.screen)}
|
|
89
|
+
/>
|
|
90
|
+
)
|
|
91
|
+
})
|
|
92
|
+
}
|
|
93
|
+
|
|
80
94
|
</View>
|
|
81
95
|
</ScrollView>
|
|
82
96
|
);
|
package/components/EButton.tsx
CHANGED
|
@@ -12,7 +12,6 @@ import { Colors } from "../utils/Color";
|
|
|
12
12
|
interface EButtonProps extends TouchableOpacityProps {
|
|
13
13
|
iconL?: JSX.Element;
|
|
14
14
|
iconR?: JSX.Element;
|
|
15
|
-
secondary?: boolean;
|
|
16
15
|
inline?: boolean;
|
|
17
16
|
small?: boolean;
|
|
18
17
|
type?: "secondary" | "clear" | "primary";
|
|
@@ -25,7 +24,6 @@ export default function EButton({
|
|
|
25
24
|
children,
|
|
26
25
|
iconL,
|
|
27
26
|
iconR,
|
|
28
|
-
secondary,
|
|
29
27
|
inline,
|
|
30
28
|
small,
|
|
31
29
|
type,
|
|
@@ -41,7 +39,7 @@ export default function EButton({
|
|
|
41
39
|
>
|
|
42
40
|
<View
|
|
43
41
|
style={[
|
|
44
|
-
tw`
|
|
42
|
+
tw`flex-row justify-center items-center px-8 rounded-full ${small ? 'h-10' : 'h-14'} ${disabled ? "opacity-40" : ""} ${
|
|
45
43
|
type === "clear"
|
|
46
44
|
? "bg-transparent"
|
|
47
45
|
: type === "secondary"
|
|
@@ -54,7 +52,7 @@ export default function EButton({
|
|
|
54
52
|
{iconL ? <View style={tw`mr-1 -ml-2`}>{iconL}</View> : null}
|
|
55
53
|
{/* LABEL */}
|
|
56
54
|
<EText
|
|
57
|
-
size={"
|
|
55
|
+
size={"sm"}
|
|
58
56
|
style={[
|
|
59
57
|
tw`font-semibold ${
|
|
60
58
|
type === "clear" ? `text-[${Colors["primary-base"]}]` : "text-white"
|
package/components/ELabel.tsx
CHANGED
|
@@ -19,7 +19,7 @@ export default function EListPerson({
|
|
|
19
19
|
}: IProps) {
|
|
20
20
|
return (
|
|
21
21
|
<View style={[tw`flex-row items-center justify-between`]}>
|
|
22
|
-
<Avatar size="sm" source={""} nameFirstLetter={
|
|
22
|
+
<Avatar size="sm" source={""} nameFirstLetter={name.split(" ")[0].charAt(0)} />
|
|
23
23
|
<View
|
|
24
24
|
style={tw` ml-3 py-3 flex-1 ${
|
|
25
25
|
noBorder ? "" : "border-b border-slate-200"
|
|
@@ -1,26 +1,33 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { TouchableOpacity, View } from
|
|
3
|
-
import tw from
|
|
4
|
-
import { Colors } from
|
|
5
|
-
import EText from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TouchableOpacity, View } from "react-native";
|
|
3
|
+
import tw from "../lib/tailwind";
|
|
4
|
+
import { Colors } from "../utils/Color";
|
|
5
|
+
import EText from "./EText";
|
|
6
6
|
|
|
7
7
|
interface IProps {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
title: string;
|
|
9
|
+
active?: boolean;
|
|
10
|
+
onPress?: () => void;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
export default function EPillButton(
|
|
13
|
+
export default function EPillButton({ title, active, onPress }: IProps) {
|
|
14
14
|
return (
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
<TouchableOpacity
|
|
16
|
+
style={[
|
|
17
|
+
tw`px-4 py-3 mr-2 border rounded-lg border-slate-300`,
|
|
18
|
+
{
|
|
19
|
+
backgroundColor: active ? Colors["secondary-base"] : "transparent",
|
|
20
|
+
borderColor: active ? Colors["secondary-base"] : Colors["border"],
|
|
21
|
+
},
|
|
22
|
+
]}
|
|
19
23
|
onPress={onPress}
|
|
24
|
+
>
|
|
25
|
+
<EText
|
|
26
|
+
size={"base"}
|
|
27
|
+
style={tw`font-normal ${active ? "text-white" : "text-slate-500"}`}
|
|
20
28
|
>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
</EText>
|
|
29
|
+
{title}
|
|
30
|
+
</EText>
|
|
24
31
|
</TouchableOpacity>
|
|
25
|
-
)
|
|
32
|
+
);
|
|
26
33
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from 'react'
|
|
2
2
|
import { Animated,StyleSheet, View } from 'react-native';
|
|
3
|
-
import tw from "
|
|
4
|
-
import { Colors } from "
|
|
3
|
+
import tw from "fln-espranza/lib/tailwind";
|
|
4
|
+
import { Colors } from "fln-espranza/utils/Color";
|
|
5
5
|
|
|
6
6
|
interface IProps{
|
|
7
7
|
progress: number;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export default function
|
|
10
|
+
export default function EProgressBar( {progress}: IProps) {
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
const barWidth = useRef(new Animated.Value(0)).current;
|
|
@@ -21,7 +21,7 @@ export default function ProgressBar( {progress}: IProps) {
|
|
|
21
21
|
}).start();
|
|
22
22
|
}, [progress]);
|
|
23
23
|
return (
|
|
24
|
-
<View style={[tw`h-2 w-14 bg-
|
|
24
|
+
<View style={[tw`h-2 w-14 bg-slate-200 overflow-hidden mr-2`, {
|
|
25
25
|
borderRadius: 40,
|
|
26
26
|
}]}>
|
|
27
27
|
<Animated.View
|
package/components/EText.tsx
CHANGED
|
@@ -61,7 +61,7 @@ export default function SecondaryBaseLayout({
|
|
|
61
61
|
tw`flex-1 bg-white`,
|
|
62
62
|
{
|
|
63
63
|
paddingBottom: Platform.OS === "ios" ? insets.bottom : 0,
|
|
64
|
-
paddingTop: Platform.OS === "ios" ?
|
|
64
|
+
paddingTop: Platform.OS === "ios" ? 12 : 24,
|
|
65
65
|
},
|
|
66
66
|
]}
|
|
67
67
|
>
|
|
@@ -111,7 +111,7 @@ export default function SecondaryBaseLayout({
|
|
|
111
111
|
{children}
|
|
112
112
|
</ScrollView>
|
|
113
113
|
{bottomButton ? (
|
|
114
|
-
<View style={tw` px-4
|
|
114
|
+
<View style={[tw` px-4 `, {paddingBottom: Platform.OS ==='android' ? 8 : 0}]}>{bottomButton}</View>
|
|
115
115
|
) : (
|
|
116
116
|
<></>
|
|
117
117
|
)}
|
package/components/index.tsx
CHANGED
|
@@ -26,7 +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 "./
|
|
29
|
+
import ProgressBar from "./EProgressBar";
|
|
30
30
|
import Loader from "./Loader";
|
|
31
31
|
|
|
32
32
|
export {
|
package/index.ts
CHANGED
|
@@ -27,7 +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/
|
|
30
|
+
import ProgressBar from "./components/EProgressBar";
|
|
31
31
|
import Loader from "./components/Loader";
|
|
32
32
|
import ETimeInput from "./components/ETimeInput";
|
|
33
33
|
import EDateInput from "./components/EDateInput";
|