AppTextField

fun AppTextField(value: String, onValueChange: (String) -> Unit, placeholder: StringResource, label: StringResource? = null, supportingText: StringResource? = null, isError: Boolean = false, type: TextFieldType = TextFieldType.NONE, leadingIcon: @Composable () -> Unit? = null, shape: Shape = MaterialTheme.shapes.extraLarge, modifier: Modifier = Modifier)

A custom OutlinedTextField styled for the application. It supports different types (email, password), labels, placeholders, and error states.

Parameters

value

The current text value of the text field.

onValueChange

Callback when the text value changes.

placeholder

The StringResource to be used as a placeholder.

label

Optional StringResource for the field label.

supportingText

Optional StringResource for helper or error text below the field.

isError

Whether the field should display an error state.

type

The TextFieldType to determine behaviors like password masking.

leadingIcon

Optional leading icon composable.

shape

The shape of the text field's outline.

modifier

The Modifier to be applied to the text field container.