import { GetProps, Label, TextArea as TamaguiTextArea, XStack, YStack, styled } from "tamagui"; import { withController } from "@/ui/components/controls/forms/withController"; import { Caption } from "@/ui/components/typography"; const StyledTextArea = styled(TamaguiTextArea, { backgroundColor: "transparent", borderWidth: 0, flex: 1, minHeight: 100, placeholderTextColor: "$gray8", size: "$4", }); type TextAreaProps = GetProps & { label?: string; caption?: string; error?: string; onChangeText?: (text: string) => void; id?: string; }; export const TextArea = (props: TextAreaProps) => { const { label, caption, error, onChangeText, id, ...rest } = props; const isInvalid = !!error; return ( {label && ( )} {caption && !isInvalid && {caption}} {isInvalid && error && {error}} ); }; export const FormTextArea = withController(TextArea);