JengaEmptyState

fun JengaEmptyState(title: String, modifier: Modifier = Modifier, description: String? = null, icon: @Composable () -> Unit? = null, actionLabel: String? = null, onAction: () -> Unit? = null, actionVariant: JengaButtonVariant = JengaButtonVariant.Outline, colors: JengaStateColors = JengaStateDefaults.colors(), titleStyle: TextStyle = JengaStateDefaults.titleStyle, descriptionStyle: TextStyle = JengaStateDefaults.descriptionStyle, contentPadding: PaddingValues = JengaStateDefaults.contentPadding, spacing: Dp = JengaStateDefaults.spacing, actionSpacing: Dp = JengaTheme.components.state?.actionSpacing ?: spacing, actionSize: JengaButtonSize = JengaStateDefaults.actionSize)(source)

A centered empty-state placeholder: optional icon, title, message, and action.

Parameters

title

the headline (e.g. "No scans yet").

modifier

the Modifier for this state.

description

optional supporting message.

icon

optional icon/illustration slot above the title.

actionLabel

optional action button label; shown with onAction.

onAction

called when the action is tapped.

actionVariant

the action button's variant; defaults to Outline.

colors

the color set; defaults to JengaStateDefaults.colors.

titleStyle

the title text style.

descriptionStyle

the description text style.

contentPadding

padding around the state.

spacing

the gap between the icon, title and description.

actionSpacing

the gap above the action button; defaults to the theme's JengaStateStyle.actionSpacing, else spacing.

actionSize

the action button size.

Samples

JengaEmptyState(
    title = "No scans yet",
    description = "Validated tickets appear here.",
    actionLabel = "Scan a ticket",
    onAction = { },
)