UNPKG

@cometchat/chat-uikit-react-native

Version:

Ready-to-use Chat UI Components for React Native

43 lines (42 loc) 1.63 kB
import { JSX } from "react"; import { CometChat } from "@cometchat/chat-sdk-react-native"; import { MessageBubbleAlignmentType } from "../../base/Types"; import { CometChatTheme } from "../../../theme/type"; import { DeepPartial } from "../../helper/types"; /** * Props for rendering reactions on a message bubble. */ export interface CometChatReactionsInterface { /** * The message object for which reactions will be displayed. */ messageObject: CometChat.BaseMessage; /** * Custom styles for the reaction bubble. */ style?: DeepPartial<CometChatTheme["messageBubbleReactionStyles"]>; /** * Callback invoked when a reaction is pressed. * * @param reaction - The reaction count object that was pressed. * @param messageObject - The message object associated with the reaction. */ onReactionPress?: (reaction: CometChat.ReactionCount, messageObject: CometChat.BaseMessage) => void; /** * Callback invoked when a reaction is long pressed. * * @param reaction - The reaction count object that was long pressed. * @param messageObject - The message object associated with the reaction. */ onReactionLongPress?: (reaction: CometChat.ReactionCount, messageObject: CometChat.BaseMessage) => void; /** * Alignment of the reaction bubble. */ alignment?: MessageBubbleAlignmentType; /** * Maximum width for the content inside the reaction bubble. */ maxContentWidth?: number; } declare const CometChatReactions: (props: CometChatReactionsInterface) => JSX.Element | null; export { CometChatReactions };