softchatjs-react
Version:
Install the softchat-js SDKs
39 lines (36 loc) • 1.41 kB
text/typescript
import * as react_jsx_runtime from 'react/jsx-runtime';
import { Dispatch, SetStateAction } from 'react';
import { Conversation, Message, UserMeta } from 'softchatjs-core';
import { ConnectionStatus } from '../../providers/clientStateProvider.mjs';
declare const ConversationList: ({ setMainListOpen, setShowUserList, showUserList, userListRef, renderConversationList, connectionStatus, resetState, }: {
setMainListOpen: any;
setShowUserList: Dispatch<SetStateAction<boolean>>;
showUserList: boolean;
userListRef: any;
renderConversationList?: (props: {
conversations: ConversationItem[];
onCoversationItemClick: (conversationItem: ConversationItem) => void;
}) => JSX.Element;
connectionStatus: ConnectionStatus;
resetState: () => void;
}) => react_jsx_runtime.JSX.Element;
type ConversationItem = {
conversation: Conversation;
lastMessage: Message;
unread: string[];
};
declare const ConversationItem: ({ item, onClick, borderBottom, }: {
item: {
conversation: Conversation;
lastMessage: Message;
unread: string[];
};
onClick: () => void;
borderBottom: string;
}) => react_jsx_runtime.JSX.Element;
declare const UserList: ({ users, userListRef, close, }: {
users?: UserMeta[];
userListRef?: any;
close: () => void;
}) => react_jsx_runtime.JSX.Element;
export { ConversationList, UserList };