JengaSectionHeader

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.

actionLabel

optional trailing action label.

onActionClick

called when the action is tapped (shown with actionLabel).

style

the header style; see JengaSectionHeaderStyle.

trailingContent

optional end slot, after the action; inherits the secondary text color.

titleStyle

the title text style; defaults to the one for style.

minHeight

the minimum header height; defaults to the theme's value for style.

contentPadding

padding around the header; defaults to the theme's value for style.

Samples

JengaSectionHeader(
    title = "Recent scans",
    actionLabel = "See all",
    onActionClick = { },
)