@accelint/design-toolkit
Version:
An open-source component library to serve as part of the entire ecosystem of UX for Accelint.
27 lines (24 loc) • 1.06 kB
TypeScript
import { RefAttributes } from 'react';
import { SearchFieldProps as SearchFieldProps$1, InputProps } from 'react-aria-components';
import { VariantProps } from 'tailwind-variants';
import { ButtonProps } from '../button/types.js';
import { IconProps } from '../icon/types.js';
import { SearchFieldStyles } from './styles.js';
import '../../lib/types.js';
import '../button/styles.js';
import 'tailwind-merge';
type SearchFieldStyleVariants = VariantProps<typeof SearchFieldStyles>;
interface SearchFieldProps extends Omit<SearchFieldProps$1, 'className' | 'pattern' | 'type'>, RefAttributes<HTMLDivElement> {
classNames?: {
field?: SearchFieldProps$1['className'];
input?: InputProps['className'];
clear?: ButtonProps['className'];
loading?: IconProps['className'];
search?: IconProps['className'];
};
inputProps?: Omit<InputProps, 'type'>;
variant?: 'filled' | 'outlined';
/** Displays a loading spinner. */
isLoading?: boolean;
}
export type { SearchFieldProps, SearchFieldStyleVariants };