PollOptionInput

fun PollOptionInput(value: String, onValueChange: (String) -> Unit, modifier: Modifier = Modifier, description: String = stringResource(id = R.string.stream_compose_poll_questions_description), enabled: Boolean = true, maxLines: Int = 1, maxLength: Int = 80, shape: Shape = ChatTheme.shapes.pollOptionInput, innerPadding: PaddingValues = PaddingValues(horizontal = 16.dp, vertical = 18.dp), keyboardOptions: KeyboardOptions = KeyboardOptions(capitalization = KeyboardCapitalization.Sentences), decorationBox: @Composable (innerTextField: @Composable () -> Unit) -> Unit)

Custom input field that we use for our Poll option UI. It's fairly simple - shows a basic input with clipped corners and a fully-customizable the input box with the decorationBox, with some extra padding on each side.

Within it, we allow for custom decoration, so that the user can define what the input field looks like when filled with content.

Parameters

value

The current input value.

onValueChange

Handler when the value changes as the user types.

modifier

Modifier for styling.

description

Description that you want to display if they value is blank.

enabled

If the Composable is enabled for text input or not.

maxLines

The number of lines that are allowed in the input.

maxLength

The number of maxLength that are allowed in the input.

innerPadding

The padding inside the input field, around the label or input.

keyboardOptions

The KeyboardOptions to be applied to the input.

decorationBox

Composable function that represents the input field decoration as it's filled with content.