'use client' import { Label as AriaLabel, Text, TextArea as AriaTextArea, TextField, } from 'react-aria-components' import { Controller, useFormContext } from 'react-hook-form' import { MaterialIcon } from '../../Icons/MaterialIcon' import { InputLabel } from '../../InputLabel' import { Typography } from '../../Typography' import styles from './textarea.module.css' import type { TextAreaProps } from './input' export default function TextArea({ 'aria-label': ariaLabel, className = '', disabled = false, helpText = '', label, name, placeholder = '', readOnly = false, registerOptions = {}, }: TextAreaProps) { const { control } = useFormContext() return ( ( {label} {helpText && !fieldState.error ? ( {helpText} ) : null} {fieldState.error ? (

{fieldState.error.message}

) : null}
)} /> ) }