@scania/tegel
Version:
Tegel Design System
54 lines (53 loc) • 1.83 kB
JavaScript
import { h } from "@stencil/core";
/**
* @slot <default> - <b>Unnamed slot.</b> For the breadcrumb elements.
*/
export class TdsBreadcrumbs {
constructor() {
this.tdsAriaLabel = undefined;
}
connectedCallback() {
if (!this.tdsAriaLabel) {
console.warn('Tegel Breadcrumbs component: missing tdsAriaLabel prop');
}
}
render() {
var _a;
(_a = this.host.children[this.host.children.length - 1]) === null || _a === void 0 ? void 0 : _a.classList.add('last');
return (h("nav", { key: 'fe6eaf7da192518c8f5078ac07082ac437b4aa9d', "aria-label": this.tdsAriaLabel }, h("div", { key: 'a33b2f1de081eff02a6101177cc72a899a81bbff', role: "list", class: "tds-breadcrumb" }, h("slot", { key: '0e7a03715689f66c35f1109d301b42694254c864' }))));
}
static get is() { return "tds-breadcrumbs"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() {
return {
"$": ["breadcrumbs.scss"]
};
}
static get styleUrls() {
return {
"$": ["breadcrumbs.css"]
};
}
static get properties() {
return {
"tdsAriaLabel": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": "The value to be used for the aria-label attribute"
},
"attribute": "tds-aria-label",
"reflect": false
}
};
}
static get elementRef() { return "host"; }
}