UNPKG

@joshfarrant/shortcuts-js

Version:
27 lines 883 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * @action Show Alert * @section Actions > Scripting > Notification * @icon Scripting * * Displays an alert with a title, a message, and two buttons. If the user selects the OK button, the shortcut continues. The cancel button stops the shortcut. * * ```js * showAlert({ * title: 'Alert', * message: 'Do you want to continue?', * showCancelButton: true, * }); * ``` */ const showAlert = ({ title = 'Alert', message = 'Do you want to continue?', showCancelButton = true, }) => ({ WFWorkflowActionIdentifier: 'is.workflow.actions.alert', WFWorkflowActionParameters: { WFAlertActionTitle: title, WFAlertActionMessage: message, WFAlertActionCancelButtonShown: showCancelButton, }, }); exports.default = showAlert; //# sourceMappingURL=showAlert.js.map