import React from 'react';
import {TextInput, View} from 'react-native';
import {colors} from '../assets/styles/colors-theme';
import {width, height} from '../services/screen';

const CommonTextInput = props => {
  return (
    <View
      style={{
        borderBottomColor: colors.textColor,
        borderBottomWidth: 1,
        marginLeft: 30,
        marginRight: 30,
        marginTop: 20,
        height: 40,
        borderRadius: 5,
      }}>
      <TextInput
        style={{
          // backgroundColor:theme.inputBgc,
          color: colors.textColor,
          height: 35,
          marginBottom: 30,
          paddingBottom: 0,
          fontSize: 13,
          paddingRight: 20,
          paddingLeft: 20,
         
        }}
        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;
