@claromentis/design-system
Version:
Claromentis Design System Component Library
66 lines (65 loc) • 1.5 kB
JavaScript
import { h } from '@stencil/core';
export class InsigniaImage {
constructor() {
this.source = undefined;
this.alt = undefined;
}
componentWillLoad() {
if (!this.alt) {
console.warn('The "alt" prop is required for <cla-insignia-image>.');
}
}
render() {
return (h("img", { src: this.source, alt: this.alt }));
}
static get is() { return "cla-insignia-image"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() {
return {
"$": ["cla-insignia-image.scss"]
};
}
static get styleUrls() {
return {
"$": ["cla-insignia-image.css"]
};
}
static get properties() {
return {
"source": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "The image source."
},
"attribute": "source",
"reflect": false
},
"alt": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": true,
"optional": false,
"docs": {
"tags": [],
"text": "The image alternative text."
},
"attribute": "alt",
"reflect": false
}
};
}
}