UNPKG

@bulmil/core

Version:

![bulmil](https://user-images.githubusercontent.com/2362138/65766959-c721a080-e16f-11e9-9fb9-45a5a2ad0391.jpg)

108 lines (107 loc) 3.4 kB
/*! * Bulmil - MIT License */ import { h } from "@stencil/core"; export class Checkbox { constructor() { this.inputClass = ''; this.labelClass = ''; this.checked = false; this.disabled = false; } render() { return (h("label", { key: 'b8b9f4e200aae88df8aa625da9e744e03c14d28a', class: { checkbox: true, [this.labelClass]: Boolean(this.labelClass), } }, h("input", { key: '19a7b66eff0080e9f75e79c79409558acb53dcf0', type: "checkbox", class: { [this.inputClass]: Boolean(this.inputClass), }, disabled: this.disabled, checked: this.checked }), h("slot", { key: 'bfa7b45e1e7a42dede0575d82c2d37972784ffa2' }))); } static get is() { return "bm-checkbox"; } static get originalStyleUrls() { return { "$": ["checkbox.scss"] }; } static get styleUrls() { return { "$": ["checkbox.css"] }; } static get properties() { return { "inputClass": { "type": "string", "mutable": false, "complexType": { "original": "string", "resolved": "string", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Input classes" }, "attribute": "input-class", "reflect": false, "defaultValue": "''" }, "labelClass": { "type": "string", "mutable": false, "complexType": { "original": "string", "resolved": "string", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Label classes" }, "attribute": "label-class", "reflect": false, "defaultValue": "''" }, "checked": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Checked" }, "attribute": "checked", "reflect": false, "defaultValue": "false" }, "disabled": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Disabled" }, "attribute": "disabled", "reflect": false, "defaultValue": "false" } }; } }