"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 "@scandic-hotels/design-system/Icons/MaterialIcon" import { Label } from "@scandic-hotels/design-system/Label" import Caption from "@/components/TempDesignSystem/Text/Caption" import Body from "../../Text/Body" 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 ( ( {helpText && !fieldState.error ? ( {helpText} ) : null} {fieldState.error ? ( {fieldState.error.message} ) : null} )} /> ) }