import React from "react";
import { TextInput, View } from "react-native";
import { scale, verticalScale, moderateScale } from "react-native-size-matters";
import Size from "../common/size";
const size = new Size();
import { colors } from '../assets/styles/colors-theme';
import {Fonts} from '../assets/styles/fonts-theme'
import { width, height } from "../common/screen";

const CommonTextInput = props => {
  return (
    <View
      style={{
        borderBottomColor:colors.textColor,
        borderBottomWidth:1,
        marginLeft: 30,
        marginRight: 30,
        marginTop: 20,
        height: verticalScale(40),
        borderRadius:5
      }}
    >
      <TextInput
        style={{
          // backgroundColor:theme.inputBgc,
          color: colors.textColor,
          height: verticalScale(35),
          marginBottom: moderateScale(30),
          paddingBottom:0,
          fontSize: 13,
          paddingRight: 20,
          paddingLeft: 20,
          fontFamily:Fonts.ubuntuL
        }}
        key = {props.key}
        value={props.value}
        underlineColorAndroid="rgba(0,0,0,0)"
        onChangeText={props.onChangeText}
        placeholder={props.placeholder}
        placeholderStyle={{fontWeight: 'bold'}}
        placeholderTextColor = {colors.textColor}
        secureTextEntry={props.secureTextEntry}
        blurOnSubmit={false}
        {...props}
        ref={(input) => props.inputRef && props.inputRef(input)}
        returnKeyType = {props.returnKeyType}
        onSubmitEditing = {props.onSubmitEditing && props.onSubmitEditing}
        onFocus={props.onFocus}
      />
    </View>
  );
};

export default CommonTextInput;
