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: '02d4f25905b20dded0ca6763b1045e611ef6287e', class: { checkbox: true, [this.labelClass]: Boolean(this.labelClass), } }, h("input", { key: 'e03bde8115e5ba6b9f4758ba7b9d2920f89c36ba', type: "checkbox", class: { [this.inputClass]: Boolean(this.inputClass), }, disabled: this.disabled, checked: this.checked }), h("slot", { key: '3b01f2c99b4a6bf1363bd238f5880ca7a43a10d5' }))); } 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" } }; } }