The promise resolves with { isConfirmed, isDismissed, dismiss }. This page shows how to chain a follow-up popup (success / info / error).
xjs.layer({
title: 'Delete item?',
text: 'This action cannot be undone.',
icon: 'warning',
showCancelButton: true,
confirmButtonText: 'Delete',
cancelButtonText: 'Cancel'
}).then((res) => {
if (res.isConfirmed) {
xjs.layer({ title: 'Deleted', icon: 'success' });
} else {
xjs.layer({ title: 'Cancelled', icon: 'info' });
}
});
<button class="btn danger">Open confirm</button>
/* Local styles for buttons only */