@cometchat/chat-uikit-react-native
Version:
Ready-to-use Chat UI Components for React Native
122 lines (121 loc) • 2.54 kB
TypeScript
import React from "react";
import { ImageStyle, TextStyle, ViewStyle, ColorValue } from "react-native";
import { CometChat } from "@cometchat/chat-sdk-react-native";
import { CometChatTheme } from "../../theme/type";
/**
*
*
* @type {string}
* @description poll question
*/
export interface PollsBubbleInterface {
/**
*
*
* @type {string}
* @description poll question
*/
pollQuestion?: string;
/**
*
*
* @type {({ id: string | number; value: string }[])}
* @description options
*/
options?: {
id: string | number;
value: string;
}[];
/**
*
*
* @type {string}
* @description poll id
*/
pollId?: string;
/**
*
*
* @type {CometChat.User}
* @description logged in user
*/
loggedInUser?: CometChat.User;
/**
*
*
* @description callback function which returns the id when user votes
*/
choosePoll?: (id: string) => void;
/**
*
*
* @type {string}
* @description uid of poll creator
*/
senderUid?: string;
/**
*
*
* @type {object}
* @description metadata attached to the poll message
*/
metadata?: any;
/***************************/
/**
*
*
* @type {TextStyle}
* @description Style for the poll question text
*/
titleStyle?: TextStyle;
/**
*
*
* @type {TextStyle}
* @description Style for the option text
*/
optionTextStyle?: TextStyle;
/**
*
*
* @type {TextStyle}
* @description Style for the vote count text
*/
voteCountTextStyle?: TextStyle;
/**
*
*
* @type {ImageStyle}
* @description Style for the selected icon
*/
selectedIconStyle?: ImageStyle;
/**
*
*
* @type {ViewStyle}
* @description Style for the radio button container
*/
radioButtonStyle?: ViewStyle;
/**
*
*
* @type {CometChatTheme["avatarStyle"]}
* @description Style for the voter avatar
*/
voteravatarStyle?: CometChatTheme["avatarStyle"];
/**
*
*
* @type {ViewStyle}
* @description Style for the progress bar container
*/
progressBarStyle?: ViewStyle;
/**
*
*
* @type {ColorValue}
* @description Active tint color for the progress bar
*/
activeProgressBarTint?: ColorValue;
}
export declare const PollsBubble: (props: PollsBubbleInterface) => React.JSX.Element;