@joshfarrant/shortcuts-js
Version:
An iOS 12 Shortcuts creator
27 lines • 883 B
JavaScript
;
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