@cometchat/chat-uikit-react-native
Version:
Ready-to-use Chat UI Components for React Native
39 lines (38 loc) • 1.31 kB
TypeScript
import React from "react";
import { ImageSourcePropType } from "react-native";
import { CometChatTheme } from "../../../theme/type";
/**
* Props for the CometChatQuickReactions component.
*/
export interface CometChatQuickReactionsProps {
/**
* An array of quick reaction emojis.
* Accepts a tuple with up to five strings.
*/
quickReactions?: [string, string?, string?, string?, string?];
/**
* Custom style for the quick reactions component.
*/
style?: CometChatTheme["quickReactionStyle"];
/**
* Callback invoked when a reaction emoji is pressed.
*
* @param {string} emoji - The emoji that was pressed.
*/
onReactionPress?: (emoji: string) => void;
/**
* Callback invoked when the add reaction button is pressed.
*/
onAddReactionPress?: () => void;
/**
* URL for the add reaction icon.
*/
addReactionUrl?: ImageSourcePropType;
}
/**
* CometChatQuickReactions displays a list of quick reaction emojis along with an option to add a new reaction.
*
* @param {CometChatQuickReactionsProps} props - Props for the component.
* @returns {JSX.Element} The rendered quick reactions component.
*/
export declare const CometChatQuickReactions: (props: CometChatQuickReactionsProps) => React.JSX.Element;