({
label,
description,
errorMessage,
...props
}: DatePickerProps<T>)
| 21 | } |
| 22 | |
| 23 | export function DatePicker<T extends DateValue>({ |
| 24 | label, |
| 25 | description, |
| 26 | errorMessage, |
| 27 | ...props |
| 28 | }: DatePickerProps<T>) { |
| 29 | return ( |
| 30 | <AriaDatePicker |
| 31 | {...props} |
| 32 | className={composeTailwindRenderProps( |
| 33 | props.className, |
| 34 | 'group flex flex-col gap-1 font-sans' |
| 35 | )}> |
| 36 | {label && <Label>{label}</Label>} |
| 37 | <FieldGroup className="min-w-[208px] w-auto cursor-text disabled:cursor-default"> |
| 38 | <DateInput className="flex-1 min-w-[150px] px-3 text-sm" /> |
| 39 | <FieldButton className="w-6 mr-1 outline-offset-0"> |
| 40 | <CalendarIcon aria-hidden className="w-4 h-4" /> |
| 41 | </FieldButton> |
| 42 | </FieldGroup> |
| 43 | {description && <Description>{description}</Description>} |
| 44 | <FieldError>{errorMessage}</FieldError> |
| 45 | <Popover className="p-2"> |
| 46 | <Calendar /> |
| 47 | </Popover> |
| 48 | </AriaDatePicker> |
| 49 | ); |
| 50 | } |
nothing calls this directly
no test coverage detected