react-native-chating-ui-kit
Version:
CometChat React Native UI Kit is a collection of custom UI Components designed to build text , chat and calling features in your application. The UI Kit is developed to keep developers in mind and aims to reduce development efforts significantly
84 lines (83 loc) • 1.85 kB
TypeScript
import React from 'react';
import { FontStyle } from '../../shared/base';
import { CometChat } from '@cometchat-pro/react-native-chat';
export interface PollsBubbleStyleInterface {
questionTextStyle: FontStyle;
questionTextColor: string;
voteCountTextStyle: FontStyle;
voteCountTextColor: string;
pollOptionsTextStyle: FontStyle;
pollOptionsTextColor: string;
radioButtonColor: string;
pollOptionsBackgroundColor: string;
selectedOptionColor: string;
unSelectedOptionColor: string;
}
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 return 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?: object;
/**
*
*
* @type {PollsBubbleStyleInterface}
* @description PollsBubbleInterface
*/
pollsBubbleStyle?: PollsBubbleStyleInterface;
}
export declare const PollsBubble: {
(props: PollsBubbleInterface): React.JSX.Element;
defaultProps: {
options: {};
loggedInUser: {};
pollsBubbleStyle: {};
};
};