JengaSearchTrigger

fun JengaSearchTrigger(placeholder: String, onClick: () -> Unit, modifier: Modifier = Modifier, trailingContent: @Composable () -> Unit? = null, shape: Shape = JengaTheme.components.searchTrigger?.shape ?: JengaSearchFieldDefaults.shape, colors: JengaTextFieldColors = JengaTheme.components.searchTrigger?.colors ?: JengaTextFieldDefaults.colors(), textStyle: TextStyle = JengaTheme.components.searchTrigger?.textStyle ?: JengaTextFieldDefaults.textStyle, minHeight: Dp = JengaTheme.components.searchTrigger?.minHeight ?: JengaTextFieldDefaults.minHeight, contentPadding: PaddingValues = JengaTheme.components.searchTrigger?.contentPadding ?: JengaTextFieldDefaults.contentPadding)(source)

A button that looks like a JengaSearchField, for entry points that open a search screen or mode instead of taking text in place. The trailingContent slot (e.g. a scan button) handles its own clicks.

Parameters

placeholder

the hint text shown in the trigger.

onClick

called when the trigger is tapped.

modifier

the Modifier for this trigger.

trailingContent

optional end slot.

shape

the trigger shape; defaults to the theme's search trigger style, else JengaSearchFieldDefaults.shape.

colors

the color set; reads the container, border, placeholder and icon colors.

textStyle

the placeholder text style.

minHeight

the minimum height of the trigger.

contentPadding

padding inside the trigger.

Samples

JengaSearchTrigger(
    placeholder = "Search tickets",
    onClick = {},
    trailingContent = {
        JengaIcon(
            imageVector = JengaIcons.QrCode,
            contentDescription = "Scan",
        )
    },
)