@bulmil/core
Version:

87 lines (86 loc) • 2.75 kB
JavaScript
/*!
* Bulmil - MIT License
*/
import { h } from "@stencil/core";
export class Icon {
constructor() {
this.color = undefined;
this.size = undefined;
this.withText = false;
}
render() {
return (h("span", { key: 'a9c8d4a50fdbf71014bacfaebc2a42c28a1d9b07', class: {
icon: !this.withText,
[this.color]: Boolean(this.color),
[this.size]: Boolean(this.size),
'icon-text': this.withText,
} }, h("slot", { key: 'ac7b8b500e7aa05651ff322cbedd636c06f1b9f2' })));
}
static get is() { return "bm-icon"; }
static get originalStyleUrls() {
return {
"$": ["icon.scss"]
};
}
static get styleUrls() {
return {
"$": ["icon.css"]
};
}
static get properties() {
return {
"color": {
"type": "string",
"mutable": false,
"complexType": {
"original": "'has-text-info' | 'has-text-success' | 'has-text-warning' | 'has-text-danger'",
"resolved": "\"has-text-danger\" | \"has-text-info\" | \"has-text-success\" | \"has-text-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
},
"withText": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "Icon text"
},
"attribute": "with-text",
"reflect": false,
"defaultValue": "false"
}
};
}
}