Jenga Segmented Control
A segmented control: a small set of mutually-exclusive options in a pill track, with the selected segment raised. A null selectedIndex shows no selection (e.g. an unanswered yes/no question).
Parameters
the selected segment index, or null for none.
the segment labels.
called with the index of a tapped segment.
the Modifier for the control.
the outer shape; defaults to JengaSegmentedControlDefaults.shape.
the color set; defaults to JengaSegmentedControlDefaults.colors.
whether the segment at an index can be selected.
the shape of each segment; defaults to the theme's segment shape, else shape.
the minimum segment height.
padding inside the track, around the segments.
shadow under the selected segment.
the segment label text style.
the label text style of the selected segment; defaults to textStyle with the theme's JengaSegmentedControlStyle.selectedTextStyle merged on top.
Samples
JengaSegmentedControl(
selectedIndex = 0,
segments = listOf(
"Day",
"Week",
),
onSelect = { },
)