JengaReactionBar

fun JengaReactionBar(onPositive: () -> Unit, onNegative: () -> Unit, modifier: Modifier = Modifier, selected: JengaReaction? = null, positiveContentDescription: String? = null, negativeContentDescription: String? = null, positiveIcon: ImageVector = JengaTheme.icons.thumbsUp, negativeIcon: ImageVector = JengaTheme.icons.thumbsDown, colors: JengaReactionBarColors = JengaReactionBarDefaults.colors(), action: @Composable () -> Unit? = null)(source)

A per-item feedback row: a positive and a negative round tonal button, then an optional trailing action (e.g. an "Add" button). Replaces walls of feedback chips with two clear one-tap affordances. Generic: the icons and the action are yours; defaults are thumbs up/down.

Parameters

onPositive

called when the positive button is tapped.

onNegative

called when the negative button is tapped.

modifier

the Modifier for the row.

selected

the reaction shown as chosen, or null for none. The bar does not change it itself: set it from onPositive and onNegative.

positiveContentDescription

accessibility label for the positive button.

negativeContentDescription

accessibility label for the negative button.

positiveIcon

the positive button icon.

negativeIcon

the negative button icon.

colors

the button color set; defaults to JengaReactionBarDefaults.colors.

action

optional trailing content, pushed to the end of the row.