Package-level declarations
Functions
Link copied to clipboard
fun EmailField(value: TextFieldValue, onValueChange: (TextFieldValue) -> Unit, validator: FormValidator = FormValidator.EMAIL, modifier: Modifier = Modifier, label: @Composable () -> Unit? = null, keyboardOptions: KeyboardOptions = KeyboardOptions(
keyboardType = KeyboardType.Email
), keyboardActions: KeyboardActions = KeyboardActions.Default, leadingIcon: @Composable () -> Unit? = {
Icon(
imageVector = AuthIcons.rememberMailIcon(),
contentDescription = "Email",
)
}, singleLine: Boolean = true, enabled: Boolean = true, isError: Boolean? = null, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, textStyle: TextStyle = LocalTextStyle.current, shape: Shape = TextFieldDefaults.shape, colors: TextFieldColors = TextFieldDefaults.colors(), supportingText: @Composable (validEmail: Boolean) -> Unit? = { if(!it) Text("Please enter a valid email address") }, trailingIcon: @Composable () -> Unit? = null, placeholder: @Composable () -> Unit? = null, formKey: String = "EMAIL", mandatory: Boolean = true)
fun EmailField(value: String, onValueChange: (String) -> Unit, validator: FormValidator = FormValidator.EMAIL, modifier: Modifier = Modifier, label: @Composable () -> Unit? = null, keyboardOptions: KeyboardOptions = KeyboardOptions(
keyboardType = KeyboardType.Email
), keyboardActions: KeyboardActions = KeyboardActions.Default, leadingIcon: @Composable () -> Unit? = {
Icon(
imageVector = AuthIcons.rememberMailIcon(),
contentDescription = "Email",
)
}, singleLine: Boolean = true, enabled: Boolean = true, isError: Boolean? = null, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, textStyle: TextStyle = LocalTextStyle.current, shape: Shape = TextFieldDefaults.shape, colors: TextFieldColors = TextFieldDefaults.colors(), supportingText: @Composable (validEmail: Boolean) -> Unit? = { if(!it) Text("Please enter a valid email address") }, trailingIcon: @Composable () -> Unit? = null, placeholder: @Composable () -> Unit? = null, formKey: String = "EMAIL", mandatory: Boolean = true)
A custom email input field with validation and pre-defined styling.
Link copied to clipboard
fun OutlinedEmailField(value: TextFieldValue, onValueChange: (TextFieldValue) -> Unit, validator: FormValidator = FormValidator.EMAIL, modifier: Modifier = Modifier, label: @Composable () -> Unit? = null, keyboardOptions: KeyboardOptions = KeyboardOptions(
keyboardType = KeyboardType.Email
), keyboardActions: KeyboardActions = KeyboardActions.Default, leadingIcon: @Composable () -> Unit? = {
Icon(
imageVector = AuthIcons.rememberMailIcon(),
contentDescription = "Email",
)
}, singleLine: Boolean = true, enabled: Boolean = true, isError: Boolean? = null, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, textStyle: TextStyle = LocalTextStyle.current, shape: Shape = OutlinedTextFieldDefaults.shape, colors: TextFieldColors = OutlinedTextFieldDefaults.colors(), supportingText: @Composable (validEmail: Boolean) -> Unit? = { if(!it) Text("Please enter a valid email address") }, trailingIcon: @Composable () -> Unit? = null, placeholder: @Composable () -> Unit? = null, formKey: String = "EMAIL", mandatory: Boolean = true)
fun OutlinedEmailField(value: String, onValueChange: (String) -> Unit, validator: FormValidator = FormValidator.EMAIL, modifier: Modifier = Modifier, label: @Composable () -> Unit? = null, keyboardOptions: KeyboardOptions = KeyboardOptions(
keyboardType = KeyboardType.Email
), keyboardActions: KeyboardActions = KeyboardActions.Default, leadingIcon: @Composable () -> Unit? = {
Icon(
imageVector = AuthIcons.rememberMailIcon(),
contentDescription = "Email",
)
}, singleLine: Boolean = true, enabled: Boolean = true, isError: Boolean? = null, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, textStyle: TextStyle = LocalTextStyle.current, shape: Shape = OutlinedTextFieldDefaults.shape, colors: TextFieldColors = OutlinedTextFieldDefaults.colors(), supportingText: @Composable (validEmail: Boolean) -> Unit? = { if(!it) Text("Please enter a valid email address") }, trailingIcon: @Composable () -> Unit? = null, placeholder: @Composable () -> Unit? = null, formKey: String = "EMAIL", mandatory: Boolean = true)
A custom email input field with validation and pre-defined styling.