ConfirmDialog¶
@Composable
fun ModalScope.ConfirmDialog(
title: Component = Component.literal("Confirm Dialog"),
confirmText: Component = Component.literal("Confirm"),
cancelText: Component = Component.literal("Cancel"),
onConfirm: () -> Unit = {},
onCancel: () -> Unit = {},
content: @Composable
() -> Unit
)
Generic confirm/cancel modal with fully custom content, rather than a fixed message layout like AlertDialog/PromptDialog/ChoiceDialog.
Parameters¶
-
title: The dialog's header text.
-
confirmText: Label for the confirm button.
-
cancelText: Label for the cancel button.
-
onConfirm: Called when the confirm button is pressed, just before the modal dismisses itself.
-
onCancel: Called when the cancel button is pressed, just before the modal dismisses itself.
-
content: The dialog body, shown above the action row.