Skip to content

Commit

Permalink
Add error example
Browse files Browse the repository at this point in the history
  • Loading branch information
xavimolloy committed Sep 7, 2023
1 parent c2b4903 commit 2cda561
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@ fun InputIntegerScreen() {
}
},
)
SubTitle("Basic Input Integer with error", textColor = TextColor.OnSurfaceVariant)
var inputValueError by rememberSaveable { mutableStateOf("") }

InputInteger(
title = "Label",
inputText = inputValueError,
onValueChanged = {
if (it != null) {
inputValueError = it
}
},
state = InputShellState.ERROR,
supportingText = listOf(SupportingTextData("Numbers only", SupportingTextState.ERROR)),
)
var inputValue2 by rememberSaveable { mutableStateOf("") }
SubTitle("Input Integer with legend", textColor = TextColor.OnSurfaceVariant)
InputInteger(
Expand Down

0 comments on commit 2cda561

Please sign in to comment.