UNPKG

react-19-kit

Version:

Ready-to-use Chat UI Components for React(Javascript/Web)

67 lines (66 loc) 1.92 kB
import React from 'react'; interface CreatePollProps { /** * Title for the poll creation form. * Optional, defaults to localized "CREATE_POLL". */ title?: string; /** * User object if the poll is directed to a specific user. * Optional. */ user?: CometChat.User; /** * Group object if the poll is directed to a specific group. * Optional. */ group?: CometChat.Group; /** * Callback function to be called when the close button is clicked. * Optional. */ ccCloseClicked?: () => void; /** * Default number of answer options to display initially. * Optional, defaults to 3. */ defaultAnswers?: number; /** * Placeholder text for the poll question input field. * Optional, defaults to localized "QUESTION". */ questionPlaceholderText?: string; /** * Placeholder text for the answer input fields. * Optional, defaults to localized "ANSWER". */ answerPlaceholderText?: string; /** * Help text for the answer input fields. * Optional, defaults to localized "SET_THE_ANSWERS". */ answerHelpText?: string; /** * Text to display for adding additional answer options. * Optional, defaults to localized "ADD_ANOTHER_ANSWER". */ addAnswerText?: string; /** * URL of the add answer icon image. * Optional, defaults to a predefined plus icon. */ addAnswerIconURL?: string; /** * Text to display on the create poll button. * Optional, defaults to localized "CREATE". */ createPollButtonText?: string; } /** * CreatePoll component that provides a form to create a new poll. * * @param {CreatePollProps} props - The props for the component. * @returns {JSX.Element} The rendered CreatePoll component. */ declare const CreatePoll: React.FC<CreatePollProps>; export { CreatePoll };