Jenga Radio List Item
A list row with a JengaRadioButton, for picking one option from a list. The whole row is the touch target and is announced as a radio button.
Parameters
the option label.
whether this option is the selected one.
called when the row is tapped.
the Modifier for this row.
optional secondary text below the headline.
whether the row is interactive.
whether the radio sits at the start or the end of the row.
the minimum row height.
inner padding around the row content.
the gap between the control and the text.
the headline text style.
the supporting text style.
the maximum lines for headline before it is truncated.
the maximum lines for supporting before it is truncated.
the diameter of the radio.
the row color set (e.g. a warning-colored supporting line); defaults to JengaSelectionListItemDefaults.colors.
optional end slot (e.g. a count), before a trailing control; tapping it selects the row.
Samples
var selected by remember {
mutableIntStateOf(
value = 0,
)
}
Column(
content = {
JengaRadioListItem(
headline = "Repair",
selected = selected == 0,
onClick = { selected = 0 },
)
JengaRadioListItem(
headline = "Replace",
selected = selected == 1,
onClick = { selected = 1 },
)
},
)