@cometchat/chat-uikit-react-native
Version:
Ready-to-use Chat UI Components for React Native
42 lines (41 loc) • 1.71 kB
TypeScript
import { CometChat } from "@cometchat/chat-sdk-react-native";
import { JSX } from "react";
import { AdditionalParams, MessageBubbleAlignmentType } from "../../shared/base/Types";
import { DataSource, DataSourceDecorator } from "../../shared/framework";
import { CometChatTheme } from "../../theme/type";
/**
* Extension decorator for rendering link preview messages.
*/
export declare class LinkPreviewExtensionDecorator extends DataSourceDecorator {
/**
* Creates an instance of LinkPreviewExtensionDecorator.
*
* @param dataSource - The data source instance to decorate.
*/
constructor(dataSource: DataSource);
/**
* Checks if the given message has been deleted.
*
* @param message - The message to check.
* @returns True if the message is deleted, otherwise false.
*/
isDeletedMessage(message: CometChat.BaseMessage): boolean;
/**
* Returns the unique ID for this extension.
*
* @returns The extension ID as a string.
*/
getId(): string;
/**
* Returns the content view for text messages.
* If the message contains link preview data, it returns a LinkPreviewBubble,
* otherwise it falls back to the super implementation.
*
* @param message - The text message.
* @param alignment - The alignment for the message bubble.
* @param theme - The current theme.
* @param additionalParams - (Optional) Additional parameters.
* @returns A JSX.Element representing the message content view.
*/
getTextMessageContentView(message: CometChat.TextMessage, alignment: MessageBubbleAlignmentType, theme: CometChatTheme, additionalParams?: AdditionalParams): JSX.Element;
}