diff --git a/components/src/main/kotlin/de/jeanlucmakiola/floret/components/GroupedList.kt b/components/src/main/kotlin/de/jeanlucmakiola/floret/components/GroupedList.kt index f11b6d6..0cb7535 100644 --- a/components/src/main/kotlin/de/jeanlucmakiola/floret/components/GroupedList.kt +++ b/components/src/main/kotlin/de/jeanlucmakiola/floret/components/GroupedList.kt @@ -37,6 +37,16 @@ fun positionOf(index: Int, count: Int): Position = when { else -> Position.Middle } +/** + * The inset a grouped list keeps from the screen edge. + * + * Exported because it is a *shared* line, not a private detail of [GroupedRow]: + * everything that sits outside the cards but belongs to them — section headers, + * hints, picker descriptions — has to start on the same edge, or the page reads + * as two ragged columns. Take this value rather than writing 16.dp again. + */ +val GroupedListInset = 16.dp + /** Corner radii for a grouped segment: full at the group's outer edges, small between. */ fun groupedShape(position: Position, full: Dp, small: Dp): Shape = when (position) { Position.Alone -> RoundedCornerShape(full) @@ -140,7 +150,7 @@ fun GroupedRow( } GroupedSurface( position = position, - modifier = modifier.padding(horizontal = 16.dp), + modifier = modifier.padding(horizontal = GroupedListInset), onClick = onClick, color = containerColor, gapBelow = gapBelow,