UNPKG

1.18 kBTypeScriptView Raw
1import type { RefinementListProps as RefinementListUiComponentProps } from '../ui/RefinementList';
2import type { SearchBoxTranslations } from '../ui/SearchBox';
3import type { RefinementListWidgetParams } from 'instantsearch.js/es/widgets/refinement-list/refinement-list';
4import type { UseRefinementListProps } from 'react-instantsearch-core';
5type UiProps = Pick<RefinementListUiComponentProps, 'canRefine' | 'items' | 'onRefine' | 'query' | 'searchBox' | 'noResults' | 'canToggleShowMore' | 'onToggleShowMore' | 'isShowingMore' | 'translations'>;
6export type RefinementListProps = Omit<RefinementListUiComponentProps, keyof UiProps> & UseRefinementListProps & Pick<RefinementListWidgetParams, 'searchable' | 'searchablePlaceholder'> & {
7 translations?: Partial<UiProps['translations'] & SearchBoxTranslations & {
8 /**
9 * What to display when there are no results.
10 */
11 noResultsText: string;
12 }>;
13};
14export declare function RefinementList({ searchable, searchablePlaceholder, attribute, operator, limit, showMore, showMoreLimit, sortBy, escapeFacetValues, transformItems, translations, ...props }: RefinementListProps): JSX.Element;
15export {};