@@ -48,7 +48,7 @@ import kiwi.orbit.compose.ui.foundation.LocalTextStyle
48
48
/* *
49
49
* A segmented switch displaying two options.
50
50
*
51
- * Renders a segmented switch displaying [optionFirst ] and [optionSecond ].
51
+ * Renders a segmented switch displaying [optionOne ] and [optionTwo ].
52
52
* Modify via custom passed [modifier].
53
53
* An information or error footer can be added to the field.
54
54
*
@@ -57,8 +57,8 @@ import kiwi.orbit.compose.ui.foundation.LocalTextStyle
57
57
* ```
58
58
* var selectedIndex by remember { mutableStateOf<Int?>(null) }
59
59
* SegmentedSwitch(
60
- * optionFirst = { Text("Off") },
61
- * optionSecond = { Text("On") },
60
+ * optionOne = { Text("Off") },
61
+ * optionTwo = { Text("On") },
62
62
* selectedIndex = selectedIndex,
63
63
* onOptionClick = { index -> selectedIndex = index },
64
64
* label = { Text("Feature") },
@@ -69,8 +69,8 @@ import kiwi.orbit.compose.ui.foundation.LocalTextStyle
69
69
@Composable
70
70
public fun SegmentedSwitch (
71
71
onOptionClick : (selectedIndex: Int ) -> Unit ,
72
- optionFirst : @Composable () -> Unit ,
73
- optionSecond : @Composable () -> Unit ,
72
+ optionOne : @Composable () -> Unit ,
73
+ optionTwo : @Composable () -> Unit ,
74
74
selectedIndex : Int? ,
75
75
modifier : Modifier = Modifier ,
76
76
label : @Composable () -> Unit = {},
@@ -79,7 +79,7 @@ public fun SegmentedSwitch(
79
79
) {
80
80
SegmentedSwitch (
81
81
onOptionClick = onOptionClick,
82
- options = listOf (optionFirst, optionSecond ),
82
+ options = listOf (optionOne, optionTwo ),
83
83
selectedIndex = selectedIndex,
84
84
modifier = modifier,
85
85
label = label,
@@ -287,8 +287,8 @@ internal fun SegmentedSwitchPreview() {
287
287
private fun SegmentedSwitchUnselectedPreview () {
288
288
var selectedIndex by remember { mutableStateOf<Int ?>(null ) }
289
289
SegmentedSwitch (
290
- optionFirst = { Text (" Male" ) },
291
- optionSecond = { Text (" Female" ) },
290
+ optionOne = { Text (" Male" ) },
291
+ optionTwo = { Text (" Female" ) },
292
292
selectedIndex = selectedIndex,
293
293
onOptionClick = { index -> selectedIndex = index },
294
294
label = { Text (" Gender" ) },
@@ -299,8 +299,8 @@ private fun SegmentedSwitchUnselectedPreview() {
299
299
private fun SegmentedSwitchSelectedPreview () {
300
300
var selectedIndex by remember { mutableStateOf<Int ?>(0 ) }
301
301
SegmentedSwitch (
302
- optionFirst = { Text (" Male" ) },
303
- optionSecond = { Text (" Female" ) },
302
+ optionOne = { Text (" Male" ) },
303
+ optionTwo = { Text (" Female" ) },
304
304
selectedIndex = selectedIndex,
305
305
onOptionClick = { index -> selectedIndex = index },
306
306
label = { Text (" Gender" ) },
0 commit comments