import React, { Ref } from "react"; import { View, ViewStyle, TextInput, TextInputProps, TextInputIOSProps, TextInputAndroidProps, StyleSheet } from "react-native"; const styles = StyleSheet.create({ container: { position: "relative", width: "100%", borderWidth: 1, borderColor: "lightgrey", borderRadius: 6, flexDirection: "row", justifyContent: "space-between", alignItems: "center", paddingHorizontal: 8 }, iconLeft: { marginRight: 5 }, iconRight: { marginLeft: 5 } }); const Input: React.FC; iconRight?: React.ReactNode; iconLeft?: React.ReactNode; }> = props => { const { style = {}, height = 40, multiline = false, value = "", editable = true, placeholder = "", secure = false, forwardRef = () => {}, iconRight = null, iconLeft = null } = props; const maxHeight = multiline ? 180 : height; const minHeight = height; return ( {iconLeft ? {iconLeft} : null} {iconRight ? {iconRight} : null} ); }; export default Input;