-
Notifications
You must be signed in to change notification settings - Fork 0
/
MyTextInput.js
41 lines (38 loc) · 1.19 KB
/
MyTextInput.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import {View, Text, TextInput} from 'react-native' ;
import { useState } from 'react';
const MyTextInput = ({
label,
value,
placeholder,
onChangeText,
mutliline = false,
numberOfViewLine = 1
}) =>{
// const [Focused, setFocused] = useState(false)
return (
<View style={{flexDirection:"column", alignItems:"stretch"}}>
<Text style={{fontSize:15, margin:3}}>{label}:</Text>
<TextInput
value={value}
onChangeText={onChangeText}
placeholder={placeholder}
mutliline={mutliline}
numberOfLines={numberOfViewLine}
// onFocus={()=>{setFocused(true)}}
// onBlur={()=>{setFocused(false)}}
style={{
height: 40,
borderColor:"gray",
borderWidth:1,
borderRadius:8,
shadowColor:'#7b2cbf',
shadowRadius:10,
// shadowOpacity:Focused?1:0,
marginBottom:10,
padding:10,
}}
/>
</View>
)
}
export default MyTextInput ;