UNPKG

@blinkk/selective-edit

Version:
28 lines 851 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Actions = void 0; const lit_html_1 = require("lit-html"); const class_map_js_1 = require("lit-html/directives/class-map.js"); class Actions { constructor(options) { this.actions = []; this.options = options || {}; } add(action) { this.actions.push(action); } get classes() { const classes = { selective__field__actions: true, }; if (this.options.modifier) { classes[`selective__field__actions--${this.options.modifier}`] = true; } return classes; } template() { return (0, lit_html_1.html) `<div class=${(0, class_map_js_1.classMap)(this.classes)}>${this.actions}</div>`; } } exports.Actions = Actions; //# sourceMappingURL=actions.js.map