UNPKG

easemob-chat-uikit

Version:

![Static Badge](https://img.shields.io/badge/platform-React-green) ![Static Badge](https://img.shields.io/badge/language-typescript-green) ![GitHub commit activity](https://img.shields.io/github/commit-activity/y/easemob/Easemob-UIKit-web) ![GitHub last c

111 lines (110 loc) 3.22 kB
import React from 'react'; import { ChatSDK } from 'module/SDK'; import { RootStore } from './index'; export interface RootConsumerProps { rootStore: RootStore; client: ChatSDK.Connection; } export interface ContextProps { rootStore: RootStore; initConfig: { token?: string; userId?: string; translationTargetLanguage?: string; useUserInfo?: boolean; maxMessages?: number; isFixedDeviceId?: boolean; useOwnUploadFun?: boolean; } & ({ appKey: string; appId?: string; } | { appKey?: string; appId: string; }); client: ChatSDK.Connection; features?: { chat?: { header?: { threadList: boolean; moreAction?: boolean; clearMessage?: boolean; deleteConversation?: boolean; audioCall?: boolean; videoCall?: boolean; pinMessage?: boolean; }; message?: { status?: boolean; thread?: boolean; reaction?: boolean; moreAction?: boolean; reply?: boolean; delete?: boolean; recall?: boolean; translate?: boolean; edit?: boolean; select?: boolean; forward?: boolean; report?: boolean; pin?: boolean; }; messageInput?: { mention?: boolean; typing?: boolean; record?: boolean; emoji?: boolean; moreAction?: boolean; file?: boolean; picture?: boolean; video?: boolean; contactCard?: boolean; }; }; conversationList?: { search?: boolean; item?: { moreAction?: boolean; deleteConversation?: boolean; pinConversation?: boolean; muteConversation?: boolean; presence?: boolean; }; }; chatroom?: { message?: { moreAction?: boolean; delete?: boolean; translate?: boolean; report?: boolean; }; messageInput?: { emoji?: boolean; gift?: boolean; }; }; chatroomMember?: { mute?: boolean; remove?: boolean; }; }; reactionConfig?: { map: { [key: string]: HTMLImageElement; }; }; theme?: { primaryColor?: string | number; mode?: 'dark' | 'light'; avatarShape?: 'circle' | 'square'; bubbleShape?: 'round' | 'square'; componentsShape?: 'round' | 'square'; ripple?: boolean; }; presenceMap?: { [key: string]: string | HTMLImageElement; }; } export declare const RootContext: React.Context<ContextProps>; export declare const RootConsumer: React.Consumer<ContextProps>; export declare const RootProvider: React.Provider<ContextProps>;