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