Update Basic dialog to allow for empty message or an empty title (#282)

This commit is contained in:
David Perez 2023-11-27 15:42:22 -06:00 committed by Álison Fernandes
parent 5864f5376d
commit 583e3cca86

View file

@ -36,16 +36,16 @@ fun BitwardenBasicDialog(
)
},
title = {
Text(
text = visibilityState.title(),
color = MaterialTheme.colorScheme.onSurface,
style = MaterialTheme.typography.headlineSmall,
)
visibilityState.title?.let {
Text(
text = it(),
style = MaterialTheme.typography.headlineSmall,
)
}
},
text = {
Text(
text = visibilityState.message(),
color = MaterialTheme.colorScheme.onSurfaceVariant,
style = MaterialTheme.typography.bodyMedium,
)
},
@ -84,7 +84,7 @@ sealed class BasicDialogState : Parcelable {
*/
@Parcelize
data class Shown(
val title: Text,
val title: Text?,
val message: Text,
) : BasicDialogState()
}