import React from 'react'; import PropTypes from 'prop-types'; import cx from 'classnames'; import s from './Field.module.css'; const { useCallback } = React; export default function Field({ id, label, value, onChange, ...props }) { const valueOnChange = useCallback(e => onChange(e), [onChange]); const labelClassName = cx({ [s.floatAbove]: typeof value === 'string' && value !== '' }); return (