Static Site
This commit is contained in:
35
Static/package/dist/collection/components/card/card-text/card-text.js
vendored
Normal file
35
Static/package/dist/collection/components/card/card-text/card-text.js
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
import { h } from "@stencil/core";
|
||||
export class CardText {
|
||||
constructor() {
|
||||
this.hasBtn = undefined;
|
||||
}
|
||||
componentWillLoad() {
|
||||
const link = this.el.closest('ifx-card').querySelector('ifx-link');
|
||||
const button = this.el.closest('ifx-card').querySelector('ifx-button');
|
||||
if (link || button) {
|
||||
this.hasBtn = true;
|
||||
}
|
||||
}
|
||||
render() {
|
||||
return (h("div", { class: `card__text-wrapper ${this.hasBtn ? 'hasBtn' : ""}` }, h("div", { class: `card-text` }, h("slot", null))));
|
||||
}
|
||||
static get is() { return "ifx-card-text"; }
|
||||
static get encapsulation() { return "shadow"; }
|
||||
static get originalStyleUrls() {
|
||||
return {
|
||||
"$": ["./card-text.scss"]
|
||||
};
|
||||
}
|
||||
static get styleUrls() {
|
||||
return {
|
||||
"$": ["card-text.css"]
|
||||
};
|
||||
}
|
||||
static get states() {
|
||||
return {
|
||||
"hasBtn": {}
|
||||
};
|
||||
}
|
||||
static get elementRef() { return "el"; }
|
||||
}
|
||||
//# sourceMappingURL=card-text.js.map
|
Reference in New Issue
Block a user