@cometchat/chat-uikit-react-native
Version:
Ready-to-use Chat UI Components for React Native
45 lines (44 loc) • 1.32 kB
TypeScript
import React from "react";
import { ImageSourcePropType, ImageStyle } from "react-native";
/**
* Props for the CometChatImageBubble component.
*/
export interface CometChatImageBubbleInterface {
/**
* Image URL to be displayed.
* Pass as an object with a `uri` property, e.g., `{ uri: "dummyUrl" }`.
*/
imageUrl: ImageSourcePropType;
/**
* Thumbnail image URL.
*
* @type {ImageSourcePropType}
*/
thumbnailUrl?: ImageSourcePropType;
/**
* Placeholder image to display while the main image is loading.
*/
placeHolderImage?: ImageSourcePropType;
/**
* Callback function to execute when the image is pressed.
*/
onPress?: Function;
/**
* Custom style for the image.
*/
style?: ImageStyle;
/**
* Resize mode for the image.
*
* @default "cover"
*/
resizeMode?: "cover" | "contain" | "stretch" | "repeat" | "center";
}
/**
* CometChatImageBubble is a component that displays an image with support for thumbnails,
* placeholders, and custom styling. It uses the CometChatImageLoader component internally.
*
* Props for the image bubble component.
* The rendered image bubble.
*/
export declare const CometChatImageBubble: (props: CometChatImageBubbleInterface) => React.JSX.Element;