@cometchat/chat-uikit-react
Version:
Ready-to-use Chat UI Components for React(Javascript/Web)
96 lines (95 loc) • 3.01 kB
TypeScript
import { JSX } from "react";
import { CalendarObject } from "../../utils/CalendarObject";
/**
* Interface for the props accepted by the CometChatMessageHeader component.
*/
interface MessageHeaderProps {
/**
* Shows the conversation summary button.
* @default false
*/
showConversationSummaryButton?: boolean;
/**
* Hides the back button in the header in mobile view.
* @default false
*/
hideBackButton?: boolean;
/**
* Hides the video call button.
* @default false
*/
hideVideoCallButton?: boolean;
/**
* Hides the voice call button.
* @default false
*/
hideVoiceCallButton?: boolean;
/**
* Hides the user's online/offline status indicator.
* @default false
*/
hideUserStatus?: boolean;
/**
* A `CometChat.User` object representing the user whose information (e.g., status) is displayed.
*/
user?: CometChat.User;
/**
* A `CometChat.Group` object representing the group whose details (e.g., member count) are displayed.
*/
group?: CometChat.Group;
/**
* Number of messages for which the summary should be shown.
* @default 1000
*/
summaryGenerationMessageCount?: number;
/**
* Enables the auto generation of conversation summary.
* @default false
*/
enableAutoSummaryGeneration?: boolean;
/**
* Callback function to handle errors related to CometChat operations.
*
* @param error - An instance of `CometChat.CometChatException` representing the error.
* @returns void
*/
onError?: ((error: CometChat.CometChatException) => void) | null;
/**
* Callback function triggered when the back action is performed.
*
* @returns void
*/
onBack?: () => void;
/**
* A custom JSX element for rendering a menu. It can be used to add options or actions.
*/
auxiliaryButtonView?: JSX.Element;
/**
* A custom JSX element for rendering a list item view, typically used to show user or group details.
*/
itemView?: JSX.Element;
/**
* A function that renders a JSX element to display the leading view.
*/
leadingView?: JSX.Element;
/**
* A function that renders a JSX element to display the title view.
*/
titleView?: JSX.Element;
/**
* Custom subtitle view, allowing you to render a JSX element as the subtitle.
* It can be used to provide additional information under the title.
*/
subtitleView?: JSX.Element;
/**
* A function that renders a JSX element to display the trailing view.
*/
trailingView?: JSX.Element;
/**
* Format for displaying the "last active" timestamp in the message header.
*/
lastActiveAtDateTimeFormat?: CalendarObject;
}
/** Functional component for rendering the CometChatMessageHeader */
export declare const CometChatMessageHeader: (props: MessageHeaderProps) => import("react/jsx-runtime").JSX.Element;
export {};