JengaInfoBar

fun JengaInfoBar(text: String, modifier: Modifier = Modifier, leadingIcon: @Composable () -> Unit? = null, shape: Shape = JengaInfoBarDefaults.shape, minHeight: Dp = JengaInfoBarDefaults.minHeight, contentPadding: PaddingValues = JengaInfoBarDefaults.contentPadding, textStyle: TextStyle = JengaInfoBarDefaults.textStyle, colors: JengaInfoBarColors = JengaInfoBarDefaults.colors())(source)

A button-shaped, non-interactive bar that states why no action is available (e.g. "View only" or "Closed"). Use it where a primary button would otherwise sit. It is read as text, not as a button.

Parameters

text

the message.

modifier

the Modifier for this bar.

leadingIcon

optional icon before the text; inherits the content color.

shape

the bar shape.

minHeight

the minimum bar height.

contentPadding

padding inside the bar.

textStyle

the text style.

colors

the color set; defaults to JengaInfoBarDefaults.colors.

Samples

JengaInfoBar(
    text = "View only",
    leadingIcon = {
        JengaIcon(
            imageVector = JengaIcons.Lock,
            contentDescription = null,
        )
    },
)