Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <View style={styles.inputGroup}>
- {/* <Text style={styles.inputLabel}>Password</Text> */}
- <TextInput
- autoCapitalize="none"
- autoCompleteType="password"
- placeholder="Password"
- placeholderTextColor={Theme.colors.white}
- autoCorrect={false}
- autoFocus={true}
- secureTextEntry={form.secureTextEntry}
- value={form.password}
- onFocus={() => console.log('hey')}
- onChangeText={(val) => setForm({...form, password: val})}
- style={styles.inputField}
- />
- <View style={styles.visibilityToggle}>
- <TouchableOpacity
- onPress={() => {
- setForm({...form, secureTextEntry: !form.secureTextEntry});
- }}
- style={{paddingVertical: 4, paddingHorizontal: 10}}>
- {form.secureTextEntry ? (
- <Ionicons
- name="eye-off-outline"
- size={20}
- color={Theme.colors.white}
- />
- ) : (
- <Ionicons
- name="eye-outline"
- size={20}
- color={Theme.colors.white}
- />
- )}
- </TouchableOpacity>
- </View>
- </View>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement