StylishPopconfirm

fun StylishPopconfirm(expanded: Boolean, onExpandedChange: (Boolean) -> Unit, modifier: Modifier = Modifier, anchor: @Composable () -> Unit, title: String, description: String? = null, confirmLabel: String = "OK", cancelLabel: String = "キャンセル", onConfirm: () -> Unit, onCancel: () -> Unit = {}, confirmColors: ButtonColors? = null, titleStyle: TextStyle = MaterialTheme.typography.titleSmall, descriptionStyle: TextStyle = MaterialTheme.typography.bodySmall, shape: Shape = RoundedCornerShape(DefaultStylishDimensions.connectedCornerRadius), width: Dp = 260.dp)

An inline confirmation anchored to a trigger — the web "Popconfirm" pattern from Ant Design.

Renders title (and optional description) in a popover anchored to anchor, with confirmLabel/cancelLabel buttons. The popover is fully hoisted via expanded/onExpandedChange.

Parameters

expanded

Whether the confirmation popover is visible.

onExpandedChange

Called when the popover should open or close (including dismissal by tapping outside).

modifier

Modifier applied to the anchor wrapper.

anchor

The trigger content (typically a destructive button).

title

The confirmation question, e.g. "この項目を削除しますか?".

description

Optional supporting explanation.

confirmLabel

Text of the confirm button. Defaults to "OK".

cancelLabel

Text of the cancel button. Defaults to "キャンセル".

onConfirm

Called when the user confirms. The caller should dismiss the popover and perform the action.

onCancel

Called when the user cancels or dismisses.

confirmColors

Optional ButtonColors for the confirm button. Defaults to the error container look for destructive confirmations.

titleStyle

Typography of title. Defaults to MaterialTheme.typography.titleSmall.

descriptionStyle

Typography of description. Defaults to MaterialTheme.typography.bodySmall.

shape

Corner shape of the popover. Defaults to RoundedCornerShape with DefaultStylishDimensions.connectedCornerRadius.

width

Width of the popover. Defaults to 260 dp.