@cometchat/chat-uikit-react-native
Version:
Ready-to-use Chat UI Components for React Native
45 lines (44 loc) • 1.3 kB
TypeScript
import { JSX } from "react";
import { ImageSourcePropType, ImageStyle, TextStyle } from "react-native";
/**
* Props for the CometChatFileBubble component.
*/
export interface CometChatFileBubbleInterface {
/**
* URL of the file to be displayed/downloaded.
*/
fileUrl: string;
/**
* Title of the file.
*/
title: string;
/**
* Subtitle or description for the file.
*/
subtitle?: string;
/**
* Custom style for the title text.
*/
titleStyle?: TextStyle;
/**
* Custom style for the subtitle text.
*/
subtitleStyle?: TextStyle;
/**
* Custom icon for download. Can be an image source or a JSX element.
*/
downloadIcon?: ImageSourcePropType | JSX.Element;
/**
* Custom style for the download icon.
*/
downloadIconStyle?: ImageStyle;
}
/**
* CometChatFileBubble is a component that displays a file bubble with title,
* subtitle and an icon indicating the file type. It handles file download,
* existence check and opening of the file.
*
* Props for the component.
* The rendered file bubble.
*/
export declare const CometChatFileBubble: ({ fileUrl, title, titleStyle, subtitleStyle, subtitle, downloadIcon, downloadIconStyle, }: CometChatFileBubbleInterface) => JSX.Element;