Skip to content

Commit

Permalink
Make email and password text fields single line (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
newmskywalker authored Jul 21, 2024
1 parent 7501809 commit 0833b1a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ fun TextFieldWithLabel(
keyboardOptions: KeyboardOptions = if (isPassword) TextFieldWithLabelDefaults.KeyboardOptions.PASSWORD else TextFieldWithLabelDefaults.KeyboardOptions.NON_UNDERLINED,
keyboardActions: KeyboardActions = KeyboardActions.Default,
helperText: String? = null,
textfieldBackgroundColor: Color = MaterialTheme.colors.surface
textfieldBackgroundColor: Color = MaterialTheme.colors.surface,
singleLine: Boolean = false,
) {
val isInputMasked = remember { mutableStateOf(isPassword) }
Column(
Expand Down Expand Up @@ -169,6 +170,7 @@ fun TextFieldWithLabel(
} else {
null
},
singleLine = singleLine,
)
Text(
text = helperText.orEmpty(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ fun Email(
keyboardOptions = keyboardOptions,
keyboardActions = keyboardActions,
helperText = emailState.getError(),
singleLine = true,
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@ fun Password(
keyboardOptions = keyboardOptions,
keyboardActions = keyboardActions,
helperText = passwordState.getError(),
singleLine = true,
)
}

0 comments on commit 0833b1a

Please sign in to comment.