UNPKG

1.09 kBTypeScriptView Raw
1import React from 'react';
2import type { HitsProps as HitsUiComponentProps } from 'instantsearch-ui-components';
3import type { Hit, BaseHit } from 'instantsearch.js';
4import type { SendEventForHits } from 'instantsearch.js/es/lib/utils';
5import type { UseHitsProps } from 'react-instantsearch-core';
6type UiProps<THit extends BaseHit> = Pick<HitsUiComponentProps<Hit<THit>>, 'hits' | 'sendEvent' | 'itemComponent' | 'emptyComponent' | 'banner' | 'bannerComponent'>;
7export type HitsProps<THit extends BaseHit> = Omit<HitsUiComponentProps<Hit<THit>>, keyof UiProps<THit>> & {
8 hitComponent?: React.JSXElementConstructor<{
9 hit: Hit<THit>;
10 sendEvent: SendEventForHits;
11 }>;
12} & {
13 bannerComponent?: React.JSXElementConstructor<{
14 banner: Required<HitsUiComponentProps<Hit<THit>>>['banner'];
15 className: string;
16 }> | false;
17} & UseHitsProps<THit>;
18export declare function Hits<THit extends BaseHit = BaseHit>({ escapeHTML, transformItems, hitComponent: HitComponent, bannerComponent: BannerComponent, ...props }: HitsProps<THit>): JSX.Element;
19export {};