@seniorsistemas/tecnologia-webcomponents
Version:
A webcomponents library for Senior Sistemas - Suite BPM products.
66 lines (65 loc) • 1.76 kB
JavaScript
import { Component, Host, h, Prop } from '@stencil/core';
import { TecStatus } from '../../models/status.model';
export class StatusBadge {
constructor() {
/**
* The status of badge (color)
*/
this.status = TecStatus.primary;
}
render() {
return (h(Host, null,
h("div", { class: "badge text-sans" },
h("span", { class: `badge-value ${this.status}` }, this.badgeText))));
}
static get is() { return "tec-status-badge"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() { return {
"$": ["status-badge.scss"]
}; }
static get styleUrls() { return {
"$": ["status-badge.css"]
}; }
static get properties() { return {
"badgeText": {
"type": "string",
"mutable": true,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "Text to show inside badge"
},
"attribute": "badge-text",
"reflect": false
},
"status": {
"type": "string",
"mutable": true,
"complexType": {
"original": "TecStatus",
"resolved": "TecStatus.danger | TecStatus.info | TecStatus.primary | TecStatus.secondary | TecStatus.success | TecStatus.warn",
"references": {
"TecStatus": {
"location": "import",
"path": "../../models/status.model"
}
}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "The status of badge (color)"
},
"attribute": "status",
"reflect": false,
"defaultValue": "TecStatus.primary"
}
}; }
}