Static Site
This commit is contained in:
67
Static/package/dist/collection/components/card/card-headline/card-headline.js
vendored
Normal file
67
Static/package/dist/collection/components/card/card-headline/card-headline.js
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
import { h } from "@stencil/core";
|
||||
export class CardHeadline {
|
||||
constructor() {
|
||||
this.direction = undefined;
|
||||
this.hasDesc = undefined;
|
||||
this.isHovered = false;
|
||||
}
|
||||
componentWillLoad() {
|
||||
var _a;
|
||||
const cardElement = this.el.closest('ifx-card');
|
||||
if (cardElement) {
|
||||
const cardClass = (_a = cardElement.shadowRoot.querySelector('.card')) === null || _a === void 0 ? void 0 : _a.className;
|
||||
if (cardClass && cardClass.includes('horizontal')) {
|
||||
this.direction = 'horizontal';
|
||||
}
|
||||
const desc = cardElement.querySelector('ifx-card-text');
|
||||
if (desc) {
|
||||
this.hasDesc = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
render() {
|
||||
return (h("div", { class: `card__headline-wrapper ${this.hasDesc ? 'withDesc' : ""}` }, h("div", { class: `card-headline ${this.direction} ${this.isHovered ? 'isHovered' : ""}` }, h("slot", null))));
|
||||
}
|
||||
static get is() { return "ifx-card-headline"; }
|
||||
static get encapsulation() { return "shadow"; }
|
||||
static get originalStyleUrls() {
|
||||
return {
|
||||
"$": ["card-headline.scss"]
|
||||
};
|
||||
}
|
||||
static get styleUrls() {
|
||||
return {
|
||||
"$": ["card-headline.css"]
|
||||
};
|
||||
}
|
||||
static get properties() {
|
||||
return {
|
||||
"isHovered": {
|
||||
"type": "boolean",
|
||||
"mutable": false,
|
||||
"complexType": {
|
||||
"original": "boolean",
|
||||
"resolved": "boolean",
|
||||
"references": {}
|
||||
},
|
||||
"required": false,
|
||||
"optional": false,
|
||||
"docs": {
|
||||
"tags": [],
|
||||
"text": ""
|
||||
},
|
||||
"attribute": "is-hovered",
|
||||
"reflect": false,
|
||||
"defaultValue": "false"
|
||||
}
|
||||
};
|
||||
}
|
||||
static get states() {
|
||||
return {
|
||||
"direction": {},
|
||||
"hasDesc": {}
|
||||
};
|
||||
}
|
||||
static get elementRef() { return "el"; }
|
||||
}
|
||||
//# sourceMappingURL=card-headline.js.map
|
Reference in New Issue
Block a user