@bulmil/core
Version:

104 lines (103 loc) • 3.3 kB
JavaScript
/*!
* Bulmil - MIT License
*/
import { h } from "@stencil/core";
export class Progress {
constructor() {
this.value = undefined;
this.max = 100;
this.color = undefined;
this.size = undefined;
}
render() {
return (h("progress", { key: 'f9299daab0d523fbf0892a4b68d7f83184dcc732', 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
}
};
}
}