@bulmil/core
Version:

74 lines (73 loc) • 2.48 kB
JavaScript
/*!
* Bulmil - MIT License
*/
import { h } from "@stencil/core";
export class Modal {
constructor() {
this.handleCloseButtonClick = () => {
this.isActive = false;
};
this.isActive = false;
this.hasModalCard = false;
}
render() {
return (h("div", { key: '23d2b9570b3ff57adc9b29d710c664e672071bcb', class: {
modal: true,
'is-active': this.isActive,
} }, h("div", { key: '17aabc304d95560f84eefabea19f1e296d1212b7', class: "modal-background" }), h("div", { key: '2b2a7fe9cc0888017e39a529016279d6af8596b0', class: {
'modal-content': !this.hasModalCard,
'modal-card': this.hasModalCard,
} }, h("slot", { key: '627ef912a446d87b333890fa9ac684e1ef372894' })), h("button", { key: '67bf83d0ad9a6da175a9a46fbc93c4f51b8b7bb9', slot: "close", class: "modal-close is-large", "aria-label": "close", onClick: this.handleCloseButtonClick })));
}
static get is() { return "bm-modal"; }
static get originalStyleUrls() {
return {
"$": ["modal.scss"]
};
}
static get styleUrls() {
return {
"$": ["modal.css"]
};
}
static get properties() {
return {
"isActive": {
"type": "boolean",
"mutable": true,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "Is Active"
},
"attribute": "is-active",
"reflect": true,
"defaultValue": "false"
},
"hasModalCard": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "Modal Card"
},
"attribute": "has-modal-card",
"reflect": false,
"defaultValue": "false"
}
};
}
}