@synergy-design-system/components
Version:
63 lines (60 loc) • 1.7 kB
JavaScript
import {
card_styles_default
} from "./chunk.QCHIEOZ2.js";
import {
HasSlotController
} from "./chunk.CHFWLQN5.js";
import {
component_styles_default
} from "./chunk.2NT3B5WJ.js";
import {
SynergyElement
} from "./chunk.L2IYPRPF.js";
import {
__decorateClass
} from "./chunk.VK2FVWOF.js";
// src/components/card/card.component.ts
import {
html
} from "lit";
import { classMap } from "lit/directives/class-map.js";
import { property } from "lit/decorators.js";
var SynCard = class extends SynergyElement {
constructor() {
super(...arguments);
this.hasSlotController = new HasSlotController(this, "footer", "header", "image");
this.shadow = false;
this.sharp = false;
}
render() {
return html`
<div
part="base"
class=${classMap({
card: true,
"card--has-footer": this.hasSlotController.test("footer"),
"card--has-header": this.hasSlotController.test("header"),
"card--has-image": this.hasSlotController.test("image"),
"card--shadow": this.shadow,
"card--sharp": this.sharp
})}
>
<slot name="image" part="image" class="card__image"></slot>
<slot name="header" part="header" class="card__header"></slot>
<slot part="body" class="card__body"></slot>
<slot name="footer" part="footer" class="card__footer"></slot>
</div>
`;
}
};
SynCard.styles = [component_styles_default, card_styles_default];
__decorateClass([
property({ reflect: true, type: Boolean })
], SynCard.prototype, "shadow", 2);
__decorateClass([
property({ reflect: true, type: Boolean })
], SynCard.prototype, "sharp", 2);
export {
SynCard
};
//# sourceMappingURL=chunk.KX3GGQHX.js.map