UNPKG

@salla.sa/twilight-components

Version:
43 lines (38 loc) 2.11 kB
/*! * Crafted with ❤ by Salla */ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client'; const sallaLoyaltyPrizeItemCss = "salla-loyalty-prize-item:hover{box-shadow:0 5px 15px 1px rgba(0, 0, 0, 0.04) !important}"; const SallaLoyaltyPrizeItem$1 = /*@__PURE__*/ proxyCustomElement(class SallaLoyaltyPrizeItem extends HTMLElement { constructor() { super(); this.__registerHost(); this.prizeItemSelected = createEvent(this, "prizeItemSelected", 7); } onPrizeItemClick() { this.prizeItemSelected.emit(this.item); } render() { return (h(Host, { key: '601dbcf73e68678eecc912c14c2b1be612a78551' }, h("div", { key: '074f8b4cb736bfabd5885d9df77bf74e7c4829a1', onClick: this.onPrizeItemClick.bind(this) }, h("img", { key: '4bec672992f7e998bde639295831a5c9ad5f5088', class: "s-loyalty-prize-item-image", src: this.item.image, alt: this.item.name }), h("div", { key: 'c8f858a7f406fe8e9123c57df627a4b6a2cbd719', class: "s-loyalty-prize-item-title" }, this.item.name), h("div", { key: '81b954aa730e07c7f32ee538692581dede3543db', class: "s-loyalty-prize-item-subtitle" }, this.item.description), h("div", { key: 'b7baeada2da364fec6ee7bd606b595b1f652d8a8', class: "s-loyalty-prize-item-points" }, this.item.cost_points, " ", salla.lang.get('pages.loyalty_program.point'))))); } static get style() { return sallaLoyaltyPrizeItemCss; } }, [0, "salla-loyalty-prize-item", { "item": [16] }]); function defineCustomElement$1() { if (typeof customElements === "undefined") { return; } const components = ["salla-loyalty-prize-item"]; components.forEach(tagName => { switch (tagName) { case "salla-loyalty-prize-item": if (!customElements.get(tagName)) { customElements.define(tagName, SallaLoyaltyPrizeItem$1); } break; } }); } defineCustomElement$1(); const SallaLoyaltyPrizeItem = SallaLoyaltyPrizeItem$1; const defineCustomElement = defineCustomElement$1; export { SallaLoyaltyPrizeItem, defineCustomElement };