TextArea and admin style fixes
parent
2e32f09042
commit
27991d4f9d
@ -0,0 +1,15 @@
|
|||||||
|
import React from 'react'
|
||||||
|
|
||||||
|
import styles from './styles.module.css'
|
||||||
|
|
||||||
|
export default function TextArea({label: _label, error, hint, height, name, value, onChange, onBlur, isValid}){
|
||||||
|
const label = _label || name.replace(name[0], name[0].toUpperCase())
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={styles.formElementContainer}>
|
||||||
|
<label htmlFor={name}>{label}:</label>
|
||||||
|
<textarea className={(isValid && !error)?'':styles.invalid} height={height} name={name} value={value} onChange={onChange} onBlur={onBlur} />
|
||||||
|
{(hint || error) && <span className={styles.hint}>{error || (isValid ? '' : hint)}</span>}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
Loading…
Reference in New Issue