stream-chat-react
Version:
React components to create chat conversations or livestream style chat
21 lines (20 loc) • 952 B
TypeScript
import React from 'react';
import type { PropsWithChildren } from 'react';
import type { TFunction } from 'i18next';
import type { TranslationLanguages } from 'stream-chat';
import type { UnknownType } from '../types/types';
import type { TDateTimeParser } from '../i18n/types';
export type TranslationContextValue = {
t: TFunction;
tDateTimeParser: TDateTimeParser;
userLanguage: TranslationLanguages;
};
export declare const TranslationContext: React.Context<TranslationContextValue>;
export declare const TranslationProvider: ({ children, value, }: PropsWithChildren<{
value: TranslationContextValue;
}>) => React.JSX.Element;
export declare const useTranslationContext: (componentName?: string) => TranslationContextValue;
export declare const withTranslationContext: <P extends UnknownType>(Component: React.ComponentType<P>) => {
(props: Omit<P, keyof TranslationContextValue>): React.JSX.Element;
displayName: string;
};