@claromentis/design-system
Version:
Claromentis Design System Component Library
80 lines (79 loc) • 2.03 kB
JavaScript
import { h } from '@stencil/core';
export class ClaIcon {
constructor() {
this.iconid = undefined;
this.fill = undefined;
this.status = "";
}
render() {
return (h("span", { class: "icon-wrapper" }, h("svg", { style: { fill: this.fill }, class: `${this.iconid} icon ${this.status}` }, h("use", { xlinkHref: `/assets/svgs/symbol-defs.svg#${this.iconid}` }))));
}
static get is() { return "cla-icon"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() {
return {
"$": ["cla-icon.scss"]
};
}
static get styleUrls() {
return {
"$": ["cla-icon.css"]
};
}
static get properties() {
return {
"iconid": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "The computed Id of the icon you're adding i.e glyphicons-basic-75-cup"
},
"attribute": "iconid",
"reflect": false
},
"fill": {
"type": "string",
"mutable": true,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "The color of the icon, this will inherit the current text color if not chosen."
},
"attribute": "fill",
"reflect": false
},
"status": {
"type": "string",
"mutable": true,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "status",
"reflect": false,
"defaultValue": "\"\""
}
};
}
}