@scania/tegel
Version:
Tegel Design System
68 lines (67 loc) • 2.3 kB
JavaScript
import { h, Host } from "@stencil/core";
// TODO this component is just for the dropdown detecting that it should
// change layout
// FIXME: Can the logic for it be directly integrated in side-menu-user instead?
/**
* @slot <default> -
* <b>Unnamed slot.</b> Used as alternative to props to inject <code><img...</code> element directly into the DOM.
* */
export class TdsSideMenuUserImage {
render() {
return (h(Host, { key: 'ac72381d5a600698ac717ef744c229193363e242' }, h("slot", { key: 'ad3f2d65cba1a212fb25c2fbb7b78deb211334c7' }), this.src && h("img", { key: '87149306298861cd4c2ba6fa26e51a53d632fac9', src: this.src, alt: this.alt })));
}
static get is() { return "tds-side-menu-user-image"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() {
return {
"$": ["side-menu-user-image.scss"]
};
}
static get styleUrls() {
return {
"$": ["side-menu-user-image.css"]
};
}
static get properties() {
return {
"src": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string | undefined",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": "The image source."
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "src"
},
"alt": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string | undefined",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": "The image alt text."
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "alt"
}
};
}
}