import * as React from 'react'; import classNames from 'classnames'; type Props = React.InputHTMLAttributes & { label: string; description?: string; }; export default ({ className, description, onChange, label, ...props }: Props) => { const [ value, setValue ] = React.useState(''); const classes = classNames('input open-label', { 'has-content': value && value.length > 0, }); return (
{ setValue(e.target.value); if (onChange) { onChange(e); } }} {...props} /> {description &&

{description}

}
); };