UNPKG

instantsearch-ui-components

Version:

Common UI components for InstantSearch.

26 lines (25 loc) 1.27 kB
/** @jsx createElement */ import type { RecordWithObjectID, Renderer } from '../../../types'; import type { ClientSideToolComponentProps } from '../types'; export type DisplayResultsTranslations = { /** * Caption shown under the groups while the tool is still streaming its * output. Defaults to "Curating results…". */ streamingLabel: string; }; export type DisplayResultsGroupCarouselProps<THit extends RecordWithObjectID> = { items: Array<RecordWithObjectID<THit>>; sendEvent: ClientSideToolComponentProps['sendEvent']; }; export type DisplayResultsToolProps<THit extends RecordWithObjectID> = { toolProps: ClientSideToolComponentProps; /** * Renders a single group's carousel. The framework wrapper owns the * carousel implementation (and its internal hooks/refs) — ui-components * just lays out the intro, per-group headers, and the streaming caption. */ groupCarouselComponent: (props: DisplayResultsGroupCarouselProps<THit>) => JSX.Element; translations?: Partial<DisplayResultsTranslations>; }; export declare function createDisplayResultsToolComponent<TObject extends RecordWithObjectID>({ createElement, Fragment }: Renderer): (userProps: DisplayResultsToolProps<TObject>) => JSX.Element;