diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/BitwardenTwoButtonDialog.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/BitwardenTwoButtonDialog.kt index 521e8d3194..1963f78f1b 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/BitwardenTwoButtonDialog.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/BitwardenTwoButtonDialog.kt @@ -8,7 +8,7 @@ import androidx.compose.runtime.Composable /** * Represents a Bitwarden-styled dialog with two buttons. * - * @param title title to show. + * @param title the optional title to show. * @param message message to show. * @param confirmButtonText text to show on confirm button. * @param dismissButtonText text to show on dismiss button. @@ -19,7 +19,7 @@ import androidx.compose.runtime.Composable */ @Composable fun BitwardenTwoButtonDialog( - title: String, + title: String?, message: String, confirmButtonText: String, dismissButtonText: String, @@ -41,17 +41,17 @@ fun BitwardenTwoButtonDialog( onClick = onConfirmClick, ) }, - title = { - Text( - text = title, - color = MaterialTheme.colorScheme.onSurface, - style = MaterialTheme.typography.headlineSmall, - ) + title = title?.let { + { + Text( + text = it, + style = MaterialTheme.typography.headlineSmall, + ) + } }, text = { Text( text = message, - color = MaterialTheme.colorScheme.onSurfaceVariant, style = MaterialTheme.typography.bodyMedium, ) },