PollCreationHeader

fun PollCreationHeader(modifier: Modifier = Modifier, color: Color = ChatTheme.colors.appBackground, shape: Shape = ChatTheme.shapes.header, elevation: Dp = 0.dp, onBackPressed: () -> Unit = {}, enabledCreation: Boolean, onPollCreateClicked: () -> Unit, leadingContent: @Composable RowScope.() -> Unit? = null, centerContent: @Composable RowScope.() -> Unit? = null, trailingContent: @Composable RowScope.() -> Unit? = null)

Poll's creation header (toolbar) Composable that consist of several components.

Parameters

modifier

The Modifier for styling.

color

The color of the surface.

shape

The shape of the surface.

elevation

The elevation of the surface.

onBackPressed

A lambda that will be executed if users click the back button on the default leadingContent.

enabledCreation

Represents if user can click the creation button or not.

onPollCreateClicked

A lambda that will be executed if users click the poll creation button.

leadingContent

Customizable composable function that represents the leading content of a poll creation item, usually holding a back action button.

centerContent

Customizable composable function that represents the center content of a poll creation item, usually holding information about the title.

trailingContent

Customizable composable function that represents the trailing content of a poll creation item, usually holding the creation action button.