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: '41df19345e2a4ed6a38eb7ee1fa7a409d19fa89d' }, h("div", { key: '2e8fadde2fe4aefbf640fd7025b4ff807739f547', onClick: this.onPrizeItemClick.bind(this) }, h("img", { key: '30342789e4dc4c65756205a928cb1011a6c3e9b3', class: "s-loyalty-prize-item-image", src: this.item.image, alt: this.item.name }), h("div", { key: 'afc2880c949c32b7acd03fafb7e67c913543e476', class: "s-loyalty-prize-item-title" }, this.item.name), h("div", { key: 'f59c157c72b18d5bc678882c0ba2619e15cea629', class: "s-loyalty-prize-item-subtitle" }, this.item.description), h("div", { key: 'a68e7ae92728ce8a17025e8ed462686c70653748', 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 };