@bulmil/core
Version:

107 lines (106 loc) • 3.75 kB
JavaScript
/*!
* Bulmil - MIT License
*/
import { h } from "@stencil/core";
export class Badge {
constructor() {
this.color = undefined;
this.position = undefined;
this.isOutlined = false;
this.isLight = false;
}
render() {
return (h("span", { key: '237227c0284c2d2f57446c36f4c44c84f8f6cc8f', class: {
badge: true,
[this.color]: Boolean(this.color),
[this.position]: Boolean(this.position),
'is-light': this.isLight,
'is-outlined': this.isOutlined,
} }, h("slot", { key: 'a89094c881ba4fdc48da44bdc7e61cb1afb1c0bc' })));
}
static get is() { return "bm-badge"; }
static get originalStyleUrls() {
return {
"$": ["badge.scss"]
};
}
static get styleUrls() {
return {
"$": ["badge.css"]
};
}
static get properties() {
return {
"color": {
"type": "string",
"mutable": false,
"complexType": {
"original": "| 'is-primary'\n | 'is-info'\n | 'is-success'\n | 'is-danger'\n | 'is-warning'\n | 'is-white'\n | 'is-dark'\n | 'is-black'",
"resolved": "\"is-black\" | \"is-danger\" | \"is-dark\" | \"is-info\" | \"is-primary\" | \"is-success\" | \"is-warning\" | \"is-white\"",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "Color"
},
"attribute": "color",
"reflect": false
},
"position": {
"type": "string",
"mutable": false,
"complexType": {
"original": "| 'is-top-left'\n | 'is-top'\n | 'is-top-right'\n | 'is-right'\n | 'is-bottom-right'\n | 'is-bottom'\n | 'is-bottom-left'\n | 'is-left'",
"resolved": "\"is-bottom\" | \"is-bottom-left\" | \"is-bottom-right\" | \"is-left\" | \"is-right\" | \"is-top\" | \"is-top-left\" | \"is-top-right\"",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "Position"
},
"attribute": "position",
"reflect": false
},
"isOutlined": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "Is outlined"
},
"attribute": "is-outlined",
"reflect": false,
"defaultValue": "false"
},
"isLight": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "Is light"
},
"attribute": "is-light",
"reflect": false,
"defaultValue": "false"
}
};
}
}