UNPKG

@salla.sa/twilight-components

Version:
76 lines (75 loc) 3.05 kB
/*! * Crafted with ❤ by Salla */ import { h, Host } from "@stencil/core"; export class SallaLoyaltyPrizeItem { 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 is() { return "salla-loyalty-prize-item"; } static get originalStyleUrls() { return { "$": ["salla-loyalty-prize-item.scss"] }; } static get styleUrls() { return { "$": ["salla-loyalty-prize-item.css"] }; } static get properties() { return { "item": { "type": "unknown", "attribute": "item", "mutable": false, "complexType": { "original": "Item", "resolved": "Item", "references": { "Item": { "location": "import", "path": "./loyalty-schema", "id": "src/components/salla-loyalty/loyalty-schema.ts::Item" } } }, "required": false, "optional": false, "docs": { "tags": [], "text": "Prize item to be displayed in this component." }, "getter": false, "setter": false } }; } static get events() { return [{ "method": "prizeItemSelected", "name": "prizeItemSelected", "bubbles": true, "cancelable": true, "composed": true, "docs": { "tags": [], "text": "Event emmited when the user select this item." }, "complexType": { "original": "Item", "resolved": "Item", "references": { "Item": { "location": "import", "path": "./loyalty-schema", "id": "src/components/salla-loyalty/loyalty-schema.ts::Item" } } } }]; } }