import React, { forwardRef } from 'react' import classNames from 'classnames' import PropTypes from 'prop-types' import useFormElement from '../utils/use-form-element' /** * TextBox Component. * */ const TextBox = forwardRef( ( { name, initialValue, label, type, className, labelClassName, inputClassName, children, ...otherProps }, ref ) => { const { id, value, handleChange, inputRef } = useFormElement( initialValue, ref ) const labelStyleProp = labelClassName === '' ? {} : { className: labelClassName, } const inputStyleProp = inputClassName === '' ? {} : { className: inputClassName, } const hasLabel = label.length > 0 return (