fln-espranza 0.0.24 → 0.0.26

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,7 +1,7 @@
1
1
 
2
2
  import React from 'react'
3
3
  import { ImageBackground, View } from 'react-native'
4
- import tw from '../../../lib/tailwind'
4
+ import tw from "../lib/tailwind"
5
5
  import EText from "./EText";
6
6
 
7
7
 
@@ -1,5 +1,6 @@
1
1
  import { Animated, ImageBackground, View } from "react-native";
2
- import tw from "../../lib/tailwind";
2
+ // import tw from '../../../lib/tailwind'
3
+ import tw from "../lib/tailwind"
3
4
  import EButtonIcon from "./EButtonIcon";
4
5
  import EText from "./EText";
5
6
  import React, { useCallback, useRef } from "react";
@@ -0,0 +1,53 @@
1
+ import { View, Text, TextInput, TextInputProps } from "react-native";
2
+ import React, { useState } from "react";
3
+ import EText from "./EText";
4
+ import tw from "../lib/tailwind";
5
+
6
+ interface EInputProps extends TextInputProps {
7
+ label?: string;
8
+ size?: "lg";
9
+ hasBackground?: boolean;
10
+ icon?: JSX.Element;
11
+ }
12
+
13
+ export default function ETextArea({
14
+ label,
15
+ size,
16
+ hasBackground,
17
+ icon,
18
+ ...props
19
+ }: EInputProps) {
20
+ const [hasFocus, setHasFocus] = useState(false);
21
+ return (
22
+ <View style={[tw`mb-4`, {}]}>
23
+ {label ? (
24
+ <EText size="sm" style={[tw`font-semibold text-slate-800`, {
25
+ // color: Colors["text-primary"]
26
+ }]}>
27
+ {label}
28
+ </EText>
29
+ ) : null}
30
+
31
+ <View
32
+ style={tw` mt-2 `}
33
+ >
34
+ <TextInput
35
+ style={[tw`h-48 rounded-lg p-4 border border-slate-300 ${
36
+ hasFocus ? "border-black " : ""
37
+ }`, {
38
+ textAlignVertical: 'top'
39
+ }]}
40
+ {...props}
41
+ multiline = {true}
42
+ onFocus={() => setHasFocus(!hasFocus)}
43
+ onBlur={() => setHasFocus(!hasFocus)}
44
+ />
45
+ {
46
+ icon ?
47
+ <>{icon}</>
48
+ : null
49
+ }
50
+ </View>
51
+ </View>
52
+ );
53
+ }
@@ -4,7 +4,7 @@ import { Animated, ImageBackground, View } from "react-native";
4
4
  import EButtonIcon from "./EButtonIcon";
5
5
  import Avatar from "./Avatar";
6
6
  import EText from "./EText";
7
- import tw from "../../../lib/tailwind";
7
+ import tw from "../lib/tailwind"
8
8
  import Constants from "expo-constants";
9
9
 
10
10
  interface IProps {
package/index.ts CHANGED
@@ -34,6 +34,7 @@ import EDateInput from "./components/EDateInput";
34
34
  import EErrorText from "./components/EErrorText";
35
35
  import EListPerson from "./components/EListPerson";
36
36
  import EListSchool from "./components/EListSchool";
37
+ import ETextArea from "./components/ETextArea";
37
38
 
38
39
  // ICONS
39
40
  import EIconAdd from "./components/icons/EIconAdd";
@@ -126,6 +127,7 @@ export {
126
127
  EQuestionText,
127
128
  EEmptyPlaceholder,
128
129
  EProfileScreenLayout,
130
+ ETextArea,
129
131
 
130
132
  // ICONS
131
133
  EIconAdd,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fln-espranza",
3
- "version": "0.0.24",
3
+ "version": "0.0.26",
4
4
  "description": "All components used inside FLN Project of Espranza Innovations",
5
5
  "main": "index.ts",
6
6
  "scripts": {