@scania/tegel
Version:
Tegel Design System
33 lines (32 loc) • 1.17 kB
JavaScript
import { h, Host } from "@stencil/core";
/**
* @slot <default> - <b>Unnamed slot.</b> For slotting a link, button, or similar.
*/
export class TdsFooterItem {
constructor() {
this.parentIsTopPart = false;
}
connectedCallback() {
var _a;
const closestGroup = this.host.closest('tds-footer-group');
if (closestGroup) {
this.parentIsTopPart = ((_a = closestGroup.parentElement) === null || _a === void 0 ? void 0 : _a.slot) === 'top';
}
}
render() {
return (h(Host, { key: 'e422cb3d81d974bdefd2a5221aa5f9df693feccd', role: "listitem" }, h("div", { key: 'bcd21f30335d92da6dd577fdc2b6e7ae273a6390', class: `${this.parentIsTopPart ? 'top-part-child' : ''}` }, h("slot", { key: '861ffb44a8f9f2e4e75ad24b2bb640be9a712129' }))));
}
static get is() { return "tds-footer-item"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() {
return {
"$": ["footer-item.scss"]
};
}
static get styleUrls() {
return {
"$": ["footer-item.css"]
};
}
static get elementRef() { return "host"; }
}