import React from 'react'; import { DateField as AriaDateField, type DateFieldProps as AriaDateFieldProps, type DateValue, type ValidationResult, } from 'react-aria-components'; import { Description, FieldError, FieldGroup, Label, } from '../Field/Field.quanta'; import { composeTailwindRenderProps } from '../utils'; import { DateInput } from '../DateInput/DateInput.quanta'; export interface DateFieldProps extends AriaDateFieldProps { label?: string; description?: string; errorMessage?: string | ((validation: ValidationResult) => string); } export function DateField({ label, description, errorMessage, ...props }: DateFieldProps) { return ( {label && } {description && {description}} {errorMessage} ); }