UNPKG

1.22 kBTypeScriptView Raw
1import React from 'react';
2import type { RelatedProductsProps as RelatedProductsUiComponentProps } from 'instantsearch-ui-components';
3import type { BaseHit } from 'instantsearch.js';
4import type { UseRelatedProductsProps } from 'react-instantsearch-core';
5type UiProps<TItem extends BaseHit> = Pick<RelatedProductsUiComponentProps<TItem>, 'items' | 'itemComponent' | 'headerComponent' | 'emptyComponent' | 'layout' | 'status' | 'sendEvent'>;
6export type RelatedProductsProps<TItem extends BaseHit> = Omit<RelatedProductsUiComponentProps<TItem>, keyof UiProps<TItem>> & UseRelatedProductsProps & {
7 itemComponent?: RelatedProductsUiComponentProps<TItem>['itemComponent'];
8 headerComponent?: RelatedProductsUiComponentProps<TItem>['headerComponent'];
9 emptyComponent?: RelatedProductsUiComponentProps<TItem>['emptyComponent'];
10 layoutComponent?: RelatedProductsUiComponentProps<TItem>['layout'];
11};
12export declare function RelatedProducts<TItem extends BaseHit = BaseHit>({ objectIDs, limit, threshold, fallbackParameters, queryParameters, escapeHTML, transformItems, itemComponent, headerComponent, emptyComponent, layoutComponent, ...props }: RelatedProductsProps<TItem>): React.JSX.Element;
13export {};