Skip to content
This repository was archived by the owner on Mar 30, 2022. It is now read-only.

Commit c4c4102

Browse files
committed
added props to textinput
1 parent 4af49fc commit c4c4102

File tree

2 files changed

+39
-5
lines changed

2 files changed

+39
-5
lines changed

src/components/form/FormInput.js

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,43 @@ const FormInput = ({
5151
}) => (
5252
<View style={[styles.container, containerStyle && containerStyle]}>
5353
<TextInput
54-
selectionColor={colors.grey3}
55-
value={value}
54+
autoCapitalize={autoCapitalize}
55+
autoCorrect={autoCorrect}
56+
autoFocus={autoFocus}
57+
blurOnSubmit={blurOnSubmit}
58+
defaultValue={defaultValue}
59+
keyboardType={keyboardType}
60+
maxLength={maxLength}
61+
multiline={multiline}
62+
onBlur={onBlur}
63+
onChange={onChange}
5664
onChangeText={onChangeText}
65+
onContentSizeChange={onContentSizeChange}
66+
onEndEditing={onEndEditing}
67+
onFocus={onFocus}
68+
onLayout={onLayout}
69+
onSelectionChange={onSelectionChange}
70+
onSubmitEditing={onSubmitEditing}
71+
placeholder={placeholder}
72+
placeholderTextColor={placeholderTextColor}
73+
returnKeyType={returnKeyType}
74+
secureTextEntry={secureTextEntry}
75+
selectTextOnFocus={selectTextOnFocus}
76+
inlineImageLeft={inlineImageLeft}
77+
inlineImagePadding={inlineImagePadding}
78+
numberOfLines={numberOfLines}
79+
returnKeyLabel={returnKeyLabel}
80+
underlineColorAndroid={underlineColorAndroid}
81+
clearButtonMode={clearButtonMode}
82+
clearTextOnFocus={clearTextOnFocus}
83+
dataDetectorTypes={dataDetectorTypes}
84+
enablesReturnKeyAutomatically={enablesReturnKeyAutomatically}
85+
keyboardAppearance={keyboardAppearance}
86+
onKeyPress={onKeyPress}
87+
selectionState={selectionState}
88+
editable={editable}
89+
selectionColor={selectionColor || colors.grey3}
90+
value={value}
5791
style={[styles.input, inputStyle && inputStyle]} />
5892
</View>
5993
)

src/contact/Contact.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ class Contact extends Component {
1818
<Text style={styles.heading}>Forms</Text>
1919
</View>
2020
<FormLabel containerStyle={styles.labelContainerStyle}>Name</FormLabel>
21-
<FormInput />
21+
<FormInput placeholder='Please enter your name...' />
2222
<FormLabel containerStyle={styles.labelContainerStyle}>Address</FormLabel>
23-
<FormInput />
23+
<FormInput placeholder='Please enter your address...' />
2424
<FormLabel containerStyle={styles.labelContainerStyle}>Phone</FormLabel>
25-
<FormInput />
25+
<FormInput placeholder='Please enter your phone number...' />
2626
<Button
2727
onPress={() => console.log('yo')}
2828
icon={{name: 'done'}}

0 commit comments

Comments
 (0)