UNPKG

@djs-button-pages/presets

Version:

A set of presets that are used for faster development.

38 lines (37 loc) 962 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const djs_button_pages_1 = require("djs-button-pages"); /** * Bind for button that deletes pagination. */ class DeleteButton extends djs_button_pages_1.ButtonWrapper { /** * Bind for button that delets pagination. * @param {ButtonData} style Styling for button. */ constructor(style) { super(style); this.setAction(DeleteButton._doAction); this.setSwitch(DeleteButton._switch); } ; /** * Action that deletes pagination. * @param {PaginationSent} pagination Pagination. * @returns {Promise<void>} */ static async _doAction(pagination) { return pagination.delete(); } ; /** * Switch that never disables the button. * @returns {false} */ static _switch() { return false; } ; } exports.default = DeleteButton; ;