UNPKG

bulmil

Version:

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

224 lines (223 loc) 6.58 kB
import { Component, Prop, h } from '@stencil/core'; export class Textarea { constructor() { /** * Control class */ this.controlClass = ''; /** * Readonly state */ this.readonly = false; /** * Disabled state */ this.disabled = false; /** * Loading state */ this.isLoading = false; /** * Fixed size */ this.hasFixedSize = false; } render() { return (h("div", { class: { control: true, 'is-loading': this.isLoading, [this.controlClass]: Boolean(this.controlClass), } }, h("textarea", { class: { textarea: true, 'has-fixed-size': this.hasFixedSize, [this.color]: Boolean(this.color), [this.size]: Boolean(this.size), [this.state]: Boolean(this.state), }, disabled: this.disabled, readonly: this.readonly }, this.value))); } static get is() { return "bm-textarea"; } static get originalStyleUrls() { return { "$": ["textarea.scss"] }; } static get styleUrls() { return { "$": ["textarea.css"] }; } static get properties() { return { "controlClass": { "type": "string", "mutable": false, "complexType": { "original": "string", "resolved": "string", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Control class" }, "attribute": "control-class", "reflect": false, "defaultValue": "''" }, "value": { "type": "any", "mutable": false, "complexType": { "original": "string | number", "resolved": "number | string", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Value" }, "attribute": "value", "reflect": false }, "color": { "type": "string", "mutable": false, "complexType": { "original": "'is-primary' | 'is-info' | 'is-success' | 'is-warning' | 'is-danger'", "resolved": "\"is-danger\" | \"is-info\" | \"is-primary\" | \"is-success\" | \"is-warning\"", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Color" }, "attribute": "color", "reflect": false }, "size": { "type": "string", "mutable": false, "complexType": { "original": "'is-small' | 'is-normal' | 'is-medium' | 'is-large'", "resolved": "\"is-large\" | \"is-medium\" | \"is-normal\" | \"is-small\"", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Size" }, "attribute": "size", "reflect": false }, "state": { "type": "string", "mutable": false, "complexType": { "original": "'is-hovered' | 'is-focused'", "resolved": "\"is-focused\" | \"is-hovered\"", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "State" }, "attribute": "state", "reflect": false }, "readonly": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Readonly state" }, "attribute": "readonly", "reflect": false, "defaultValue": "false" }, "disabled": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Disabled state" }, "attribute": "disabled", "reflect": false, "defaultValue": "false" }, "isLoading": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Loading state" }, "attribute": "is-loading", "reflect": false, "defaultValue": "false" }, "hasFixedSize": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Fixed size" }, "attribute": "has-fixed-size", "reflect": false, "defaultValue": "false" }, "rows": { "type": "number", "mutable": false, "complexType": { "original": "number", "resolved": "number", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Rows" }, "attribute": "rows", "reflect": false } }; } }