Skip to main content

Create Poll

Overview

CreatePollUI is a component used to render the user interface for creating a new poll. It provides customizable fields for entering the poll question, adding poll options, and setting poll preferences (like allowing multiple selections). The component handles user input and updates the poll data structure dynamically as the user interacts with it.

LMFeedMediaPreviewScreen

Callbacks

  • onPollExpiryTimeClicked: Triggered when the user clicks to view or edit the poll's expiry time.
  • onAddOptionClicked: Triggered when the user clicks to add a new option to the poll.
  • onPollOptionCleared: Triggered when a poll option is removed, providing the index of the cleared option.
  • onPollCompleteClicked: Triggered when the user marks the poll as complete.

Customisation

PropertyTypeDescription
pollQuestionsStyleReact.CSSPropertiesStyle for the poll questions.
pollOptionsStyleReact.CSSPropertiesStyle for the poll options.
pollExpiryTimeStyleReact.CSSPropertiesStyle for the poll expiry time text.
pollAdvancedOptionTextStyleReact.CSSPropertiesStyle for the text of advanced poll options.
pollAdvancedOptionExpandIconstringPath or URL to the icon used for expanding advanced options.
pollAdvancedOptionMinimiseIconstringPath or URL to the icon used for minimizing advanced options.
pollAdvanceOptionsSwitchThumbColorstringColor of the switch thumb in advanced options.
pollAdvanceOptionsSwitchTrackColorstringColor of the switch track in advanced options.