mirror of
https://github.com/bitwarden/android.git
synced 2024-11-24 10:25:57 +03:00
[PM-9407] Create reusable overwrite passkey confirmation dialog (#3541)
This commit is contained in:
parent
93cde9bfdc
commit
94781bc1a9
1 changed files with 29 additions and 0 deletions
|
@ -0,0 +1,29 @@
|
|||
package com.x8bit.bitwarden.ui.platform.components.dialog
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import com.x8bit.bitwarden.R
|
||||
|
||||
/**
|
||||
* A reusable dialog for confirming whether or not the user wants to overwrite an existing FIDO 2
|
||||
* credential.
|
||||
*
|
||||
* @param onConfirmClick A callback for when the overwrite confirmation button is clicked.
|
||||
* @param onDismissRequest A callback for when the dialog is requesting dismissal.
|
||||
*/
|
||||
@Suppress("MaxLineLength")
|
||||
@Composable
|
||||
fun BitwardenOverwritePasskeyConfirmationDialog(
|
||||
onConfirmClick: () -> Unit,
|
||||
onDismissRequest: () -> Unit,
|
||||
) {
|
||||
BitwardenTwoButtonDialog(
|
||||
title = stringResource(id = R.string.overwrite_passkey),
|
||||
message = stringResource(id = R.string.this_item_already_contains_a_passkey_are_you_sure_you_want_to_overwrite_the_current_passkey),
|
||||
confirmButtonText = stringResource(id = R.string.ok),
|
||||
dismissButtonText = stringResource(id = R.string.cancel),
|
||||
onConfirmClick = onConfirmClick,
|
||||
onDismissClick = onDismissRequest,
|
||||
onDismissRequest = onDismissRequest,
|
||||
)
|
||||
}
|
Loading…
Reference in a new issue