I'm using forms from react-native-elements and would like to center the input text. I've tried, alignSelf: 'center'
as well as flex: 1, justifyContent: 'center', alignItems: 'center'
without any luck. All text continues to remain left aligned.
JFYI, I'm making adjustments to the inputStyle
prop.
<FormInput
...
inputStyle={styles.formInputText}
/>
Try the textAlign
attribute
<FormInput
...
inputStyle={styles.formInputText}
textAlign={'center'}
/>
Also, you may want to upgrade your package as it looks like FormInput
has been deprecated according to the docs...
<FormInput />
is only available in v0.19.1 and below.<Input />
is only available inv1.0.0-beta1
and higher.