-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTitledInput.js
43 lines (42 loc) · 1.15 KB
/
TitledInput.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
42
43
import React, { Component } from 'react';
import { View, Text, TextInput } from 'react-native';
export const TitledInput = ({ label, value, onChangeText, placeholder, secureTextEntry }) => {
const { inputStyle, labelStyle, containerStyle } = styles;
return (
<View style={containerStyle}>
<Text style={labelStyle}>{label.toUpperCase()}</Text>
<TextInput
autoCorrect={false}
placeholder={placeholder}
secureTextEntry={secureTextEntry}
value={value}
onChangeText={onChangeText}
style={inputStyle}
/>
</View>
);
};
const styles = {
inputStyle: {
paddingRight: 5,
paddingLeft: 5,
paddingBottom: 2,
color: '#262626',
fontSize: 18,
fontWeight: '200',
height: 40
},
labelStyle: {
fontSize: 12,
color: '#7F7D7D',
fontWeight: '200',
},
containerStyle: {
margin: 30,
height: 45,
flexDirection: 'column',
width: '100%',
borderColor: '#D4D4D4',
borderBottomWidth: 1,
}
};