@salla.sa/twilight-components
Version:
Salla Web Component
29 lines (23 loc) • 1.29 kB
JavaScript
/*!
* Crafted with ❤ by Salla
*/
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-a2d7a914.js');
const sallaLoyaltyPrizeItemCss = "salla-loyalty-prize-item:hover{-webkit-box-shadow:0 5px 15px 1px rgba(0, 0, 0, 0.04) !important;box-shadow:0 5px 15px 1px rgba(0, 0, 0, 0.04) !important}";
const SallaLoyaltyPrizeItem = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
this.prizeItemSelected = index.createEvent(this, "prizeItemSelected", 7);
this.item = undefined;
}
onPrizeItemClick() {
this.prizeItemSelected.emit(this.item);
}
render() {
return (index.h(index.Host, null, index.h("div", { onClick: this.onPrizeItemClick.bind(this) }, index.h("img", { class: "s-loyalty-prize-item-image", src: this.item.image, alt: this.item.name }), index.h("div", { class: "s-loyalty-prize-item-title" }, this.item.name), index.h("div", { class: "s-loyalty-prize-item-subtitle" }, this.item.description), index.h("div", { class: "s-loyalty-prize-item-points" }, this.item.cost_points, " Points"))));
}
};
SallaLoyaltyPrizeItem.style = sallaLoyaltyPrizeItemCss;
exports.salla_loyalty_prize_item = SallaLoyaltyPrizeItem;
//# sourceMappingURL=salla-loyalty-prize-item.cjs.entry.js.map