fln-espranza 0.0.35 → 0.0.36
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.
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import moment from 'moment'
|
|
2
2
|
import React, { useState } from 'react'
|
|
3
3
|
import { View, TouchableOpacity } from 'react-native'
|
|
4
|
-
import { ClockIcon } from 'react-native-heroicons/solid'
|
|
5
|
-
import { onChange } from 'react-native-reanimated'
|
|
6
4
|
import DateTimePicker from '@react-native-community/datetimepicker';
|
|
7
5
|
import tw from '../../../lib/tailwind'
|
|
8
6
|
import { CalendarIcon } from 'react-native-heroicons/outline';
|
|
9
7
|
import EText from './EText';
|
|
10
8
|
import ELabel from './ELabel';
|
|
9
|
+
import { Colors } from 'fln-espranza/utils/Color'
|
|
11
10
|
|
|
12
11
|
interface IProps {
|
|
13
12
|
label: string;
|
|
14
13
|
value: string;
|
|
15
14
|
onChange: (value: string) => void;
|
|
16
|
-
style?:
|
|
15
|
+
style?: any;
|
|
16
|
+
placeholder?: string;
|
|
17
17
|
maxDate?: Date;
|
|
18
18
|
minDate?: Date;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export default function EDateInput({ label, value, style, maxDate, minDate, onChange }: IProps) {
|
|
21
|
+
export default function EDateInput({ label, value, style, placeholder, maxDate, minDate, onChange }: IProps) {
|
|
22
22
|
const [show, setShow] = useState(false);
|
|
23
23
|
|
|
24
24
|
const handleOnChange = (event: any, selectedDate: any) => {
|
|
@@ -29,13 +29,13 @@ export default function EDateInput({ label, value, style, maxDate, minDate, onCh
|
|
|
29
29
|
|
|
30
30
|
return (
|
|
31
31
|
|
|
32
|
-
<View style={tw`
|
|
32
|
+
<View style={[tw`mb-4 `, style]}>
|
|
33
33
|
<ELabel label={label} />
|
|
34
34
|
<TouchableOpacity
|
|
35
35
|
style={tw`h-12 rounded-lg px-4 flex-row justify-between items-center border border-slate-300 lowercase my-2 bg-white`}
|
|
36
36
|
onPress={() => setShow(true)}
|
|
37
37
|
>
|
|
38
|
-
<EText size={"sm"} style={tw`font-normal`}>
|
|
38
|
+
<EText size={"sm"} style={tw`font-normal text-slate-400`}>
|
|
39
39
|
{
|
|
40
40
|
value ? moment(value).format("DD/MM/YYYY") : "Select Date"
|
|
41
41
|
}
|
|
@@ -48,7 +48,7 @@ export default function EDateInput({ label, value, style, maxDate, minDate, onCh
|
|
|
48
48
|
minimumDate={minDate}
|
|
49
49
|
maximumDate={maxDate}
|
|
50
50
|
/> : <></>}
|
|
51
|
-
<CalendarIcon size={20} style={tw`text-
|
|
51
|
+
<CalendarIcon size={20} style={tw`text-[${Colors["primary-base"]}]`} />
|
|
52
52
|
</TouchableOpacity>
|
|
53
53
|
</View>
|
|
54
54
|
)
|
package/components/EInput.tsx
CHANGED
|
@@ -10,6 +10,7 @@ interface EInputProps extends TextInputProps {
|
|
|
10
10
|
size?: "lg";
|
|
11
11
|
hasBackground?: boolean;
|
|
12
12
|
icon?: JSX.Element;
|
|
13
|
+
style?: any;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
export default function EInput({
|
|
@@ -17,11 +18,12 @@ export default function EInput({
|
|
|
17
18
|
size,
|
|
18
19
|
hasBackground,
|
|
19
20
|
icon,
|
|
21
|
+
style,
|
|
20
22
|
...props
|
|
21
23
|
}: EInputProps) {
|
|
22
24
|
const [hasFocus, setHasFocus] = useState(false);
|
|
23
25
|
return (
|
|
24
|
-
<View style={[tw`mb-4`, {}]}>
|
|
26
|
+
<View style={[tw`mb-4`, {style}]}>
|
|
25
27
|
{label ? (
|
|
26
28
|
<EText size="sm" style={[tw`font-semibold text-slate-800`, {
|
|
27
29
|
// color: Colors["text-primary"]
|
|
@@ -31,7 +33,7 @@ export default function EInput({
|
|
|
31
33
|
) : null}
|
|
32
34
|
|
|
33
35
|
<View
|
|
34
|
-
style={tw` mt-2
|
|
36
|
+
style={tw` mt-2`}
|
|
35
37
|
>
|
|
36
38
|
<TextInput
|
|
37
39
|
style={tw`h-12 rounded-lg px-4 flex-row items-center border border-slate-300 ${
|
|
@@ -18,7 +18,7 @@ export default function EListSchool({
|
|
|
18
18
|
}: IProps) {
|
|
19
19
|
return (
|
|
20
20
|
<View style={tw`border-b border-slate-200 py-3`}>
|
|
21
|
-
<EText style={tw`font-bold text-slate-800 mb-0.5`} numberOfLines={
|
|
21
|
+
<EText style={tw`font-bold text-slate-800 mb-0.5 flex-1`} numberOfLines={2}>
|
|
22
22
|
{name}
|
|
23
23
|
</EText>
|
|
24
24
|
<View style={tw`flex-row items-center`}>
|
package/components/ETextArea.tsx
CHANGED
|
@@ -19,7 +19,7 @@ export default function ETextArea({
|
|
|
19
19
|
}: EInputProps) {
|
|
20
20
|
const [hasFocus, setHasFocus] = useState(false);
|
|
21
21
|
return (
|
|
22
|
-
<View style={[tw
|
|
22
|
+
<View style={[tw``, {}]}>
|
|
23
23
|
{label ? (
|
|
24
24
|
<EText size="sm" style={[tw`font-semibold text-slate-800`, {
|
|
25
25
|
// color: Colors["text-primary"]
|
|
@@ -32,7 +32,7 @@ export default function ETextArea({
|
|
|
32
32
|
style={tw` mt-2 `}
|
|
33
33
|
>
|
|
34
34
|
<TextInput
|
|
35
|
-
style={[tw`h-
|
|
35
|
+
style={[tw`h-24 rounded-lg p-4 border border-slate-300 ${
|
|
36
36
|
hasFocus ? "border-black " : ""
|
|
37
37
|
}`, {
|
|
38
38
|
textAlignVertical: 'top'
|
|
@@ -2,7 +2,6 @@ import moment from 'moment'
|
|
|
2
2
|
import React, { useState } from 'react'
|
|
3
3
|
import { View, TouchableOpacity } from 'react-native'
|
|
4
4
|
import { ClockIcon } from 'react-native-heroicons/outline'
|
|
5
|
-
import { onChange } from 'react-native-reanimated'
|
|
6
5
|
import DateTimePicker from '@react-native-community/datetimepicker';
|
|
7
6
|
import tw from '../../../lib/tailwind'
|
|
8
7
|
import EText from './EText';
|
|
@@ -12,7 +11,7 @@ interface IProps {
|
|
|
12
11
|
label: string;
|
|
13
12
|
value: string;
|
|
14
13
|
onChange: (value: string) => void;
|
|
15
|
-
style?:
|
|
14
|
+
style?: any;
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
export default function ETimeInput( { label, value,style, onChange }: IProps ) {
|
|
@@ -28,13 +27,13 @@ export default function ETimeInput( { label, value,style, onChange }: IProps ) {
|
|
|
28
27
|
|
|
29
28
|
return (
|
|
30
29
|
|
|
31
|
-
<View style={tw`
|
|
30
|
+
<View style={[tw`mb-4 `, style]}>
|
|
32
31
|
<ELabel label={label} />
|
|
33
32
|
<TouchableOpacity
|
|
34
33
|
style={tw`h-12 rounded-lg px-4 flex-row justify-between items-center border border-slate-300 lowercase my-2 bg-white`}
|
|
35
34
|
onPress={() => setShow(true)}
|
|
36
35
|
>
|
|
37
|
-
<EText size={"sm"} style={tw`font-normal`}>
|
|
36
|
+
<EText size={"sm"} style={tw`font-normal text-slate-400`}>
|
|
38
37
|
{
|
|
39
38
|
// value ? value : moment(date).format("hh:mm A")
|
|
40
39
|
value ? value : "Select Time"
|