({
label,
description,
errorMessage,
placeholder,
...props
}: SearchFieldProps)
| 18 | } |
| 19 | |
| 20 | export function SearchField({ |
| 21 | label, |
| 22 | description, |
| 23 | errorMessage, |
| 24 | placeholder, |
| 25 | ...props |
| 26 | }: SearchFieldProps) { |
| 27 | return ( |
| 28 | <AriaSearchField |
| 29 | {...props} |
| 30 | className={composeTailwindRenderProps( |
| 31 | props.className, |
| 32 | 'group flex flex-col gap-1 min-w-[40px] font-sans max-w-full' |
| 33 | )}> |
| 34 | {label && <Label>{label}</Label>} |
| 35 | <FieldGroup> |
| 36 | <SearchIcon |
| 37 | aria-hidden |
| 38 | className="w-4 h-4 ml-2 text-neutral-500 dark:text-neutral-400 forced-colors:text-[ButtonText] group-disabled:text-neutral-200 dark:group-disabled:text-neutral-600 forced-colors:group-disabled:text-[GrayText]" |
| 39 | /> |
| 40 | <Input |
| 41 | placeholder={placeholder} |
| 42 | className="pl-2 [&::-webkit-search-cancel-button]:hidden" |
| 43 | /> |
| 44 | <FieldButton className="mr-1 w-6 group-empty:invisible"> |
| 45 | <XIcon aria-hidden className="w-4 h-4" /> |
| 46 | </FieldButton> |
| 47 | </FieldGroup> |
| 48 | {description && <Description>{description}</Description>} |
| 49 | <FieldError>{errorMessage}</FieldError> |
| 50 | </AriaSearchField> |
| 51 | ); |
| 52 | } |
nothing calls this directly
no test coverage detected