Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function deleteItem() { /* ... */ }
function doAction(buttonIndex, buttonLabel) {
if (buttonIndex == 0) {
/* Edit clicked */
} else if (buttonIndex == 1) {
/* Rename clicked */
}
}
dialog.openButtonDialog(
"What do you want to do?",
{ label: "Edit" },
{ label: "Rename" },
{ label: "Delete", type: "destroy", onClick: deleteItem },
{ label: "Cancel", type: "cancel" },
{ style: "translucent", onClick: doAction }
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.