@bulmil/core
Version:

42 lines (37 loc) • 1.56 kB
JavaScript
/*!
* Bulmil - MIT License
*/
import { HTMLElement, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
const buttonsCss = "bm-buttons bm-button:not(:last-child):not(.is-fullwidth){margin-right:0.5rem}bm-buttons .buttons:last-child{margin-bottom:initial}bm-buttons:last-child{margin-bottom:-0.5rem}bm-buttons:not(:last-child){margin-bottom:1rem}bm-buttons .buttons.has-addons bm-button:not(:first-child) .button{border-bottom-left-radius:0;border-top-left-radius:0}bm-buttons .buttons.has-addons bm-button:not(:last-child) .button{border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}bm-buttons .buttons.has-addons bm-button:last-child .button{margin-right:0}";
let Buttons = class extends HTMLElement {
constructor() {
super();
this.__registerHost();
}
render() {
return (h(Host, null, h("div", { class: {
buttons: true,
[this.size]: Boolean(this.size),
} }, h("slot", null))));
}
static get style() { return buttonsCss; }
};
Buttons = /*@__PURE__*/ proxyCustomElement(Buttons, [4, "bm-buttons", {
"size": [1]
}]);
function defineCustomElement$1() {
if (typeof customElements === "undefined") {
return;
}
const components = ["bm-buttons"];
components.forEach(tagName => { switch (tagName) {
case "bm-buttons":
if (!customElements.get(tagName)) {
customElements.define(tagName, Buttons);
}
break;
} });
}
const BmButtons = Buttons;
const defineCustomElement = defineCustomElement$1;
export { BmButtons, defineCustomElement };