import React, { useState } from 'react' import Caption from '../../pb_caption/_caption' import TextInput from '../../pb_text_input/_text_input' import Title from '../../pb_title/_title' const TextInputDefault = (props) => { const handleOnChangeFirstName = ({ target }) => { setFirstName(target.value) } const ref = React.createRef() const [firstName, setFirstName] = useState('') const [formFields, setFormFields] = useState({ firstName: 'Jane', lastName: 'Doe', phone: '8888888888', email: 'jane@doe.com', zip: 55555, }) const handleOnChangeFormField = ({ target }) => { const { name, value } = target setFormFields({ ...formFields, [name]: value }) } return (


{'Event Handler Props'}
{'onChange'}
{firstName !== '' && ( {`First name is: ${firstName}`} )}
) } export default TextInputDefault