Add warning message to InputLayout
This commit is contained in:
parent
955724b320
commit
761f8b51bc
1 changed files with 9 additions and 0 deletions
|
@ -15,6 +15,7 @@ internal fun InputLayout(
|
|||
modifier: Modifier = Modifier,
|
||||
contentPadding: PaddingValues = inputContentPadding(),
|
||||
errorMessage: String? = null,
|
||||
warningMessage: String? = null,
|
||||
content: @Composable () -> Unit,
|
||||
) {
|
||||
Column(
|
||||
|
@ -32,5 +33,13 @@ internal fun InputLayout(
|
|||
color = MainTheme.colors.error,
|
||||
)
|
||||
}
|
||||
|
||||
AnimatedVisibility(visible = warningMessage != null) {
|
||||
TextCaption(
|
||||
text = warningMessage ?: "",
|
||||
modifier = Modifier.padding(start = MainTheme.spacings.double, top = MainTheme.spacings.half),
|
||||
color = MainTheme.colors.warning,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue