Files
oi-metrology/Server/wwwroot/package/dist/collection/components/card/card-headline/card-headline.js
Mike Phares 5c9f0d1aff Remove with Text
Remove GetEngineeringSpcReview
Better error message
EnforceCodeStyleInBuild
NginxFileSystem
Remove Reactors and Working Directory
AppSettings
Delete self contained Thunder Tests
Back to .net8.0
api/v4/InfinityQS
ApiExplorerSettings
Wafer Counter
2024-04-15 13:13:55 -07:00

68 lines
1.8 KiB
JavaScript

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