MCPcopy Index your code
hub / github.com/adobe/react-spectrum / DateField

Function DateField

starters/tailwind/src/DateField.tsx:22–38  ·  view source on GitHub ↗
({
  label,
  description,
  errorMessage,
  ...props
}: DateFieldProps<T>)

Source from the content-addressed store, hash-verified

20}
21
22export function DateField<T extends DateValue>({
23 label,
24 description,
25 errorMessage,
26 ...props
27}: DateFieldProps<T>) {
28 return (
29 <AriaDateField
30 {...props}
31 className={composeTailwindRenderProps(props.className, 'flex flex-col gap-1')}>
32 {label && <Label>{label}</Label>}
33 <DateInput />
34 {description && <Description>{description}</Description>}
35 <FieldError>{errorMessage}</FieldError>
36 </AriaDateField>
37 );
38}
39
40const segmentStyles = tv({
41 base: 'inline p-0.5 whitespace-nowrap type-literal:p-0 rounded-xs outline outline-0 forced-color-adjust-none caret-transparent text-neutral-800 dark:text-neutral-200 forced-colors:text-[ButtonText] [-webkit-tap-highlight-color:transparent]',

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected