@bulmil/core
Version:

43 lines (38 loc) • 1.86 kB
JavaScript
/*!
* Bulmil - MIT License
*/
import { proxyCustomElement, HTMLElement, h, Host } 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}";
const BmButtonsStyle0 = buttonsCss;
const Buttons = /*@__PURE__*/ proxyCustomElement(class Buttons extends HTMLElement {
constructor() {
super();
this.__registerHost();
this.size = undefined;
}
render() {
return (h(Host, { key: '0b46a22c53db37ad1042339560f832796b5015de' }, h("div", { key: 'a9e10ff1783a1560d7bdac0dfddd2f5094d77c9d', class: {
buttons: true,
[this.size]: Boolean(this.size),
} }, h("slot", { key: 'cd4290f5f4ff1a56b586e2a9a21c99695f5f0c36' }))));
}
static get style() { return BmButtonsStyle0; }
}, [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 };