@cometchat/chat-uikit-react
Version:
Ready-to-use Chat UI Components for React(Javascript/Web)
76 lines (75 loc) • 2.41 kB
TypeScript
import { CometChatMessageTemplate } from "../../modals";
import { CalendarObject } from "../../utils/CalendarObject";
import { CometChatTextFormatter } from "../../formatters";
import { JSX } from 'react';
interface CometChatThreadHeaderProps {
/**
* Hides the visibility of the date header.
* @default false
*/
hideDate?: boolean;
/**
* Hides the visibility of the reply count.
* @default false
*/
hideReplyCount?: boolean;
/**
* Represents the parent message for displaying threaded conversations.
*/
parentMessage: CometChat.BaseMessage;
/**
* Template for customizing the appearance of the message.
*/
template?: CometChatMessageTemplate;
/**
* Callback function triggered when the threaded message header is closed.
* @returns void
*/
onClose?: () => void;
/**
* A custom view for rendering the message bubble.
*
* @param messageObject - The message to be rendered.
* @returns A JSX Element to be rendered as message bubble view.
*/
messageBubbleView?: JSX.Element;
/**
* Callback function triggered when an error occurs.
*
* @param error - An instance of CometChat.CometChatException representing the error.
* @returns void
*/
onError?: ((error: CometChat.CometChatException) => void) | null;
/**
* Format for the date separators in threaded message preview.
*/
separatorDateTimeFormat?: CalendarObject;
/**
* Format for the timestamp displayed next to messages.
*/
messageSentAtDateTimeFormat?: CalendarObject;
/**
* Hides the visibility of receipt in the Thread Header.
* @default false
*/
hideReceipts?: boolean;
/**
* Array of text formatters for custom styling or formatting of message text bubbles.
*/
textFormatters?: CometChatTextFormatter[];
/**
* Callback function triggered when the subtitle is clicked.
*/
onSubtitleClicked?: () => void;
/**
* Custom subtitle view to display below the thread title.
*/
subtitleView?: JSX.Element;
/**
* Controls the visibility of the scrollbar in the list.
* @defaultValue `false`
*/
showScrollbar?: boolean;
}
declare const CometChatThreadHeader: (props: CometChatThreadHeaderProps) => import("react/jsx-runtime").JSX.Element;
export { CometChatThreadHeader };