import { useEffect, useRef, useState } from 'react' import PropTypes from 'prop-types' import { updateRefHeight } from '../../utils' export function InputBox({ onSubmit, enabled }) { const [value, setValue] = useState('') const inputRef = useRef(null) useEffect(() => { updateRefHeight(inputRef) }) const onKeyDown = (e) => { if (e.keyCode === 13 && e.shiftKey === false) { e.preventDefault() if (!value) return onSubmit(value) setValue('') } } return (