Skip to content

Commit

Permalink
Add warning message to InputLayout
Browse files Browse the repository at this point in the history
  • Loading branch information
wmontwe authored and cketti committed Oct 6, 2023
1 parent 955724b commit 761f8b5
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ internal fun InputLayout(
modifier: Modifier = Modifier,
contentPadding: PaddingValues = inputContentPadding(),
errorMessage: String? = null,
warningMessage: String? = null,
content: @Composable () -> Unit,
) {
Column(
Expand All @@ -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,
)
}
}
}

0 comments on commit 761f8b5

Please sign in to comment.