Jenga Section
fun JengaSection(modifier: Modifier = Modifier, title: String? = null, subtitle: String? = null, actionLabel: String? = null, onActionClick: () -> Unit? = null, space: Dp = JengaTheme.spacing.md, content: @Composable ColumnScope.() -> Unit)(source)
A titled section: an optional header (title + supporting line + trailing action, via JengaSectionHeader) above a token-spaced body. Use to structure a screen into labelled blocks without re-plumbing Columns and headers.
Parameters
modifier
the Modifier for the section.
title
optional section title; when null no header is shown.
subtitle
optional supporting line under the title.
action Label
optional trailing action label.
on Action Click
called when the action is tapped (shown with actionLabel).
space
vertical gap between the header and body items; defaults to spacing.md.
content
the section body, in a ColumnScope.
Samples
JengaSection(
title = "Recent scans",
actionLabel = "See all",
onActionClick = { },
content = {
JengaText(
text = "Row one",
)
JengaText(
text = "Row two",
)
},
)Content copied to clipboard