UNPKG

@larva.io/webcomponents

Version:

Fentrica SmartUnits WebComponents package

152 lines (151 loc) 5.27 kB
/*! * (C) Fentrica http://fentrica.com - Seee LICENSE.md */ import { Host, h } from "@stencil/core"; import { createColorClasses } from "../../../utils/theme"; export class LarvaButton { constructor() { /** * outline styled button */ this.outline = false; /** * size */ this.size = 'default'; /** * expand */ this.expand = 'full'; /** * If `true`, the user cannot interact with the button. */ this.disabled = false; } render() { return (h(Host, { key: '48a3c46d8b77e3df9fa0568880574409050d2196', class: Object.assign(Object.assign({}, createColorClasses(this.color)), { 'lar-button': true, 'lar-button-disabled': this.disabled, 'lar-button-outline': this.outline, 'lar-button-small': this.size === 'small', 'lar-button-full': this.expand === 'full' }) }, h("button", { key: '9e9b44901468e3ce06b28fc48dd0c08164e0f7dc', disabled: this.disabled }, h("slot", { key: '796d182732bb1a885d796bb27d9ed17bda9eaca7' })))); } static get is() { return "lar-button"; } static get encapsulation() { return "shadow"; } static get originalStyleUrls() { return { "$": ["button.scss"] }; } static get styleUrls() { return { "$": ["button.css"] }; } static get properties() { return { "color": { "type": "string", "mutable": false, "complexType": { "original": "Color", "resolved": "string", "references": { "Color": { "location": "import", "path": "../../../interface", "id": "src/interface.d.ts::Color" } } }, "required": false, "optional": true, "docs": { "tags": [], "text": "The color to use from your application's color palette.\nDefault options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`." }, "getter": false, "setter": false, "reflect": false, "attribute": "color" }, "outline": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": true, "docs": { "tags": [], "text": "outline styled button" }, "getter": false, "setter": false, "reflect": false, "attribute": "outline", "defaultValue": "false" }, "size": { "type": "string", "mutable": false, "complexType": { "original": "('small' | 'default')", "resolved": "\"default\" | \"small\"", "references": {} }, "required": false, "optional": true, "docs": { "tags": [], "text": "size" }, "getter": false, "setter": false, "reflect": false, "attribute": "size", "defaultValue": "'default'" }, "expand": { "type": "string", "mutable": false, "complexType": { "original": "('full' | 'block')", "resolved": "\"block\" | \"full\"", "references": {} }, "required": false, "optional": true, "docs": { "tags": [], "text": "expand" }, "getter": false, "setter": false, "reflect": false, "attribute": "expand", "defaultValue": "'full'" }, "disabled": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "If `true`, the user cannot interact with the button." }, "getter": false, "setter": false, "reflect": true, "attribute": "disabled", "defaultValue": "false" } }; } static get elementRef() { return "el"; } } //# sourceMappingURL=button.js.map