import React from 'react' import styles from './ModalInput.module.css' interface Props { label: string value: string onChange: (value: string) => void placeholder?: string maxLength?: number showCounter?: boolean required?: boolean className?: string } const ModalInput: React.FC = ({ label, value, onChange, placeholder, maxLength, showCounter = false, required = false, className = '' }) => { return (
onChange(e.target.value)} placeholder={placeholder} maxLength={maxLength} required={required} className={styles.input} /> {showCounter && maxLength && (
{value.length}/{maxLength}
)}
) } export default ModalInput