mirror of
https://github.com/bitwarden/android.git
synced 2025-03-15 18:58:59 +03:00
Allow BitwardenTwoButtonDialog to have no title (#338)
This commit is contained in:
parent
d09b98f0fe
commit
404ba6e2f0
1 changed files with 9 additions and 9 deletions
|
@ -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,
|
||||
)
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue