UNPKG

@scania/tegel

Version:
51 lines (50 loc) 1.92 kB
import { h, Host } from "@stencil/core"; import inheritAriaAttributes from "../../../utils/inheritAriaAttributes"; export class TdsHeaderHamburger { constructor() { this.tdsAriaLabel = undefined; } connectedCallback() { if (!this.tdsAriaLabel) { console.warn('Tegel Header Hamburger component: missing tdsAriaLabel prop'); } } render() { const inheritedButtonProps = Object.assign({}, inheritAriaAttributes(this.host)); return (h(Host, { key: '5ea87f94483c167f580c26c7914a22cb6caea885' }, h("tds-header-item", { key: 'f2792ffbd859c263165b95b7d2cd9d1c76509c8f' }, h("button", Object.assign({ key: 'd1c44fcf5b7bb9c3cefbbbf09e3217704770f761' }, inheritedButtonProps, { "aria-label": this.tdsAriaLabel }), h("tds-icon", { key: '62ec94113557c7032a3145ad4b6ac22d39d6453c', class: "icon", name: "burger", size: "20px" }))))); } static get is() { return "tds-header-hamburger"; } static get encapsulation() { return "shadow"; } static get originalStyleUrls() { return { "$": ["header-hamburger.scss"] }; } static get styleUrls() { return { "$": ["header-hamburger.css"] }; } static get properties() { return { "tdsAriaLabel": { "type": "string", "mutable": false, "complexType": { "original": "string", "resolved": "string", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Value to be used by the aria-label attribute" }, "attribute": "tds-aria-label", "reflect": false } }; } static get elementRef() { return "host"; } }