UNPKG

bulmil

Version:

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

95 lines (94 loc) 2.86 kB
import { Component, Prop, h } from '@stencil/core'; export class Progress { constructor() { /** * Maximum value */ this.max = 100; } render() { return (h("progress", { class: { progress: true, [this.color]: Boolean(this.color), [this.size]: Boolean(this.size), }, value: this.value, max: this.max }, typeof this.value === 'number' && `${this.value}%`)); } static get is() { return "bm-progress"; } static get originalStyleUrls() { return { "$": ["progress.scss"] }; } static get styleUrls() { return { "$": ["progress.css"] }; } static get properties() { return { "value": { "type": "number", "mutable": false, "complexType": { "original": "number", "resolved": "number", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Value" }, "attribute": "value", "reflect": false }, "max": { "type": "number", "mutable": false, "complexType": { "original": "number", "resolved": "number", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Maximum value" }, "attribute": "max", "reflect": false, "defaultValue": "100" }, "color": { "type": "string", "mutable": false, "complexType": { "original": "'is-primary' | 'is-link' | 'is-info' | 'is-success' | 'is-warning' | 'is-danger'", "resolved": "\"is-danger\" | \"is-info\" | \"is-link\" | \"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-medium' | 'is-large'", "resolved": "\"is-large\" | \"is-medium\" | \"is-small\"", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Size" }, "attribute": "size", "reflect": false } }; } }