KPAlertDialog

fun KPAlertDialog(message: String, modifier: Modifier = Modifier, title: String = "", dialogProperties: DialogProperties = DialogProperties(), negativeButton: @Composable DialogButtons.() -> Unit? = null, positiveButton: @Composable DialogButtons.() -> Unit? = null, neutralButton: @Composable DialogButtons.() -> Unit? = null, onDismissRequest: () -> Unit)

Displays an KPAlertDialog with customizable options for title, message, and buttons.

This composable function allows you to create an alert dialog with a title, a message, and optional buttons. You can specify a negative button, a positive button, and a neutral button, each of which can be customized with composable content.

Parameters

modifier

Modifier to be applied to the AlertDialog container.

title

The title text to be displayed at the top of the dialog. Defaults to an empty string.

message

The main content message to be displayed in the dialog. This parameter is required.

dialogProperties

Configuration options for the dialog's behavior.

negativeButton

Composable function for the negative button. If null, no negative button is shown.

positiveButton

Composable function for the positive button. If null, no positive button is shown.

neutralButton

Composable function for the neutral button. If null, no neutral button is shown.

onDismissRequest

A lambda function that is called when the dialog is requested to be dismissed.