UNPKG

@scania/tegel

Version:
68 lines (67 loc) 2.24 kB
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 { constructor() { this.src = undefined; this.alt = undefined; } render() { return (h(Host, { key: 'f673e69a1f9064b9b70def6942bb357b0fbbef1a' }, h("slot", { key: 'd2b6b1b29dd8ab033e229aac63aa864a2d866be6' }), this.src && h("img", { key: 'f72afa71088d565a19d43dec0646f657eba9c5c3', 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", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "The image source." }, "attribute": "src", "reflect": false }, "alt": { "type": "string", "mutable": false, "complexType": { "original": "string", "resolved": "string", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "The image alt text." }, "attribute": "alt", "reflect": false } }; } }