import React, { Component } from 'react' export class InputFormComponent extends Component { constructor(props) { super(props) this.state = { focused: false } } handleFocus = (e) => { this.setState({ focused: true }) } render() { const {errorMessage,setValue, ...inputProps} = this.props return (
this.props.setValue(e)} {...inputProps} onBlur={this.handleFocus} focused={this.state.focused.toString()} /> {this.props.errorMessage}
) } } export default InputFormComponent