LLWidgetVoteOption
LLWidgetVoteOption
is a container component that renders a vote based widget option details using LLWidgetOption as its presentational component. It derives all the option details and interaction handler needed by LLWidgetOption
component.
This widget is used by:
Hooks used by LLWidgetVoteOption
LLWidgetVoteOption
- useWidgetInteractionActions
- useWidgetResultState
- useWidgetOptions
- useInteractedWidgetOption
- useIsWidgetOptionDisabled
LLWidgetVoteOption Props
Customisation
Refer customisation core concepts to understand different level of component customisation.
widgetId
widgetId
Type | Default |
---|---|
String (Required) | No Default |
optionIndex
optionIndex
Type | Default |
---|---|
Number (Required) | No Default |
Index of the widget option
selectedOptionIndex
selectedOptionIndex
Type | Default |
---|---|
Number (Required) | -1 when no option is selected |
Index of the selected widget option
correctable
correctable
Type | Default |
---|---|
Boolean | false |
Specify whether a widget option is correctable i.e show a green border for a correct option or red border for an incorrect option. Used by Prediction follow up widget.
onOptionChange
onOptionChange
Type | Default |
---|---|
(optionIndex: number) => void; | No Default |
Function that gets invoked with option index whenever vote option is selected.
OptionComponent
OptionComponent
Type | Default |
---|---|
Component of type LLWidgetOption | LLWidgetOption |
Presentational component for option component.
OptionComponentStyles
OptionComponentStyles
Type | Default |
---|---|
StyleSheet of type LLWidgetOptionStyles | No Default, if present styles props would be applied on top of internal LLWidgetOptionStyles |
OptionComponentStyles
prop that could be used to modify styles of default rendered LLWidgetOption
component.
Updated 12 months ago