@cometchat/chat-uikit-react-native
Version:
Ready-to-use Chat UI Components for React Native
53 lines (52 loc) • 1.43 kB
TypeScript
import { JSX } from "react";
import { ImageSourcePropType, ImageStyle, TextStyle, ViewStyle } from "react-native";
/**
* Interface for the menu items (tooltip actions).
*/
export interface MenuItemInterface {
text: string;
onPress: () => void;
icon?: ImageSourcePropType | JSX.Element;
textStyle?: TextStyle;
iconStyle?: ImageStyle;
iconContainerStyle?: ViewStyle;
disabled?: boolean;
}
/**
* Props for the CometChatTooltipMenu component.
*/
type CometChatTooltipMenuProps = {
/**
* Controls the visibility of the tooltip menu.
*/
visible?: boolean;
/**
* Callback function invoked when the tooltip menu is dismissed.
*/
onDismiss?: () => void;
/**
* Callback function invoked when the tooltip menu is closed.
*/
onClose?: () => void;
/**
* The event object containing the coordinates where the tooltip menu should appear.
*/
event: {
nativeEvent: {
/**
* The X coordinate of the event.
*/
pageX: number;
/**
* The Y coordinate of the event.
*/
pageY: number;
};
};
/**
* An array of menu item objects that define the options in the tooltip menu.
*/
menuItems: MenuItemInterface[];
};
export declare const CometChatTooltipMenu: (props: CometChatTooltipMenuProps) => JSX.Element;
export {};