You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
462 B
JavaScript

import React from 'react'
import styles from './styles.module.css'
export default function Input({label, hint, type, name, value, onChange, onBlur, isValid}){
return (
<div className={styles.formElementContainer}>
<label htmlFor={name}>{label}:</label>
<input className={isValid?'':styles.invalid} type={type} name={name} value={value} onChange={onChange} onBlur={onBlur} />
<span className={styles.hint}>{hint}</span>
</div>
)
}