Jenga Section Header
fun JengaSectionHeader(title: String, modifier: Modifier = Modifier, subtitle: String? = null, actionLabel: String? = null, onActionClick: () -> Unit? = null, style: JengaSectionHeaderStyle = JengaSectionHeaderStyle.Title, trailingContent: @Composable () -> Unit? = null, titleStyle: TextStyle = JengaSectionHeaderDefaults.titleStyle(style), minHeight: Dp = JengaTheme.components.sectionHeader?.of(style)?.minHeight ?: JengaSectionHeaderDefaults.MinHeight, contentPadding: PaddingValues = JengaTheme.components.sectionHeader?.of(style)?.contentPadding
?: JengaSectionHeaderDefaults.contentPadding)(source)
Pattern (organism), a section header: a title with an optional trailing text action and an optional trailing slot (e.g. a count or an icon action). Composed from JengaText + JengaButton.
With JengaSectionHeaderStyle.Overline the title is shown in uppercase.
Parameters
title
the section title.
modifier
the Modifier for this header.
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).
style
the header style; see JengaSectionHeaderStyle.
trailing Content
optional end slot, after the action; inherits the secondary text color.
title Style
the title text style; defaults to the one for style.
min Height
the minimum header height; defaults to the theme's value for style.
content Padding
padding around the header; defaults to the theme's value for style.
Samples
JengaSectionHeader(
title = "Recent scans",
actionLabel = "See all",
onActionClick = { },
)Content copied to clipboard