diff options
Diffstat (limited to 'src/components/Field.js')
| -rw-r--r-- | src/components/Field.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/Field.js b/src/components/Field.js index 8041a3b..fd5b0d3 100644 --- a/src/components/Field.js +++ b/src/components/Field.js @@ -1,14 +1,14 @@ import React from 'react'; import PropTypes from 'prop-types'; -import cx from 'classnames'; +import cx from 'clsx'; 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 valueOnChange = useCallback((e) => onChange(e), [onChange]); const labelClassName = cx({ - [s.floatAbove]: typeof value === 'string' && value !== '' + [s.floatAbove]: typeof value === 'string' && value !== '', }); return ( <div className={s.root}> @@ -25,5 +25,5 @@ Field.propTypes = { type: PropTypes.oneOf(['text', 'number']), onChange: PropTypes.func, id: PropTypes.string, - label: PropTypes.string + label: PropTypes.string, }; |
