UNPKG

react-instantsearch

Version:
27 lines (26 loc) 1.06 kB
import React from 'react'; export type StatsProps = React.ComponentProps<'div'> & { nbHits: number; processingTimeMS: number; nbSortedHits?: number; areHitsSorted?: boolean; classNames?: Partial<StatsClassNames>; translations: { rootElementText: StatsTranslations; /** * Text announced to assistive technologies when the results change. It * omits volatile details (such as the processing time) so that only the * meaningful result count is spoken. */ announcementText?: StatsTranslations; }; }; export type StatsTranslationOptions = Pick<StatsProps, 'nbHits' | 'processingTimeMS' | 'nbSortedHits' | 'areHitsSorted'>; export type StatsTranslations = (options: StatsTranslationOptions) => string; export type StatsClassNames = { /** * Class names to apply to the root element */ root: string; }; export declare function Stats({ classNames, nbHits, processingTimeMS, nbSortedHits, areHitsSorted, translations, ...props }: StatsProps): React.JSX.Element;