import React from 'react'; import { SearchIcon } from '../icons/SearchIcon'; import { CloseIcon } from '../icons/CloseIcon'; import { SearchField as AriaSearchField, type SearchFieldProps as AriaSearchFieldProps, type ValidationResult, } from 'react-aria-components'; import { Button } from '../Button/Button.quanta'; import { Description, FieldError, FieldGroup, Input, Label, } from '../Field/Field.quanta'; import { composeTailwindRenderProps } from '../utils'; export interface SearchFieldProps extends AriaSearchFieldProps { label?: string; description?: string; errorMessage?: string | ((validation: ValidationResult) => string); placeholder?: string; } export function SearchField({ label, description, errorMessage, placeholder, ...props }: SearchFieldProps) { return ( {label && } {description && {description}} {errorMessage} ); }