import React from 'react'; import { TextField as AriaTextField, type TextFieldProps as AriaTextFieldProps, type ValidationResult, } from 'react-aria-components'; import { Description, FieldError, Input, Label, inputStyles, } from '../Field/Field.quanta'; import { composeTailwindRenderProps } from '../utils'; export interface TextFieldProps extends AriaTextFieldProps { label?: string; description?: string; errorMessage?: string | ((validation: ValidationResult) => string); placeholder?: string; } export function TextField({ label, description, errorMessage, ...props }: TextFieldProps) { return ( {label && } {description && {description}} {errorMessage} ); }