import React from "react"; import { View, Text, TouchableOpacity, TextInput, StyleSheet, } from "react-native"; import { globalStyles } from "../styles/global"; const InputField = ({ label, icon, inputType, keyboardType, filedButtonLabel, fieldButtonFunction, onChangeText, text }) => { return ( {icon} {inputType === "password" ? ( { if (onChangeText) { onChangeText(inputText); } }} /> ) : ( { if (onChangeText) { onChangeText(inputText); } }} /> )} {filedButtonLabel} ); }; const styles = StyleSheet.create({ textField: { flexDirection: "row", borderBottomColor: "#ccc", borderBottomWidth: 1, paddingBottom: 8, marginBottom: 25, }, textInput: { flex: 1, paddingVertical: 0, fontFamily: "poppins-regular", }, }); export default InputField;