ReactionOptions

fun ReactionOptions(ownReactions: List<Reaction>, onReactionOptionSelected: (ReactionOptionItemState) -> Unit, onShowMoreReactionsSelected: () -> Unit, modifier: Modifier = Modifier, numberOfReactionsShown: Int = DefaultNumberOfReactionsShown, horizontalArrangement: Arrangement.Horizontal = Arrangement.SpaceBetween, reactionTypes: Map<String, ReactionIcon> = ChatTheme.reactionIconFactory.createReactionIcons(), @DrawableRes showMoreReactionsIcon: Int = R.drawable.stream_compose_ic_more, itemContent: @Composable RowScope.(ReactionOptionItemState) -> Unit = { option -> DefaultReactionOptionItem( option = option, onReactionOptionSelected = onReactionOptionSelected, ) })

Displays all available reactions.

Parameters

ownReactions

A list of user's own reactions.

onReactionOptionSelected

Handler that propagates click events on each item.

onShowMoreReactionsSelected

Handler that propagates clicks on the show more button.

modifier

Modifier for styling.

numberOfReactionsShown

The maximum number of reactions shown before the show more reactions button is displayed.

horizontalArrangement

Used for changing the arrangement.

reactionTypes

All available reactions.

showMoreReactionsIcon

Drawable resource used for the show more button.

itemContent

Composable that allows the user to customize the individual items shown in ReactionOptions. By default shows individual reactions.