@cometchat/chat-uikit-react-native
Version:
Ready-to-use Chat UI Components for React Native
38 lines (37 loc) • 1.37 kB
TypeScript
import { CometChat } from "@cometchat/chat-sdk-react-native";
import { JSX } from "react";
import { ColorValue, TextStyle } from "react-native";
import { CometChatTextFormatter } from "../CometChatTextFormatter";
export declare class CometChatUrlsFormatter extends CometChatTextFormatter {
protected style: {
linkTextColor?: ColorValue;
linkTextFont?: TextStyle;
};
constructor(loggedInUser?: CometChat.User);
private Link;
setStyle: (style: {
linkTextFont?: TextStyle;
linkTextColor?: ColorValue;
}) => void;
private getPatternGroup;
/**
* Formats the input text if provided, otherwise edits the text at the cursor position.
*
* @param {string|null} inputText - The input text to be formatted.
* @returns {string|void} - The formatted input text, or void if inputText is not provided.
*/
getFormattedText(inputText: string | null | JSX.Element): any;
getFormatTextForLinks: ({ str, style }: any) => any;
/**
* Retrieves the message object.
*
* @returns {CometChat.BaseMessage} - The current message object.
*/
getMessage(): CometChat.BaseMessage;
/**
* Sets the message object.
*
* @param {CometChat.BaseMessage} messageObject - The message object to be set.
*/
setMessage(messageObject: CometChat.BaseMessage): void;
}