collective-webcomponents
Version:
Stencil Component Starter
57 lines (56 loc) • 1.76 kB
JavaScript
export class CollectiveProducts {
constructor() {
this.products = [];
}
render() {
return (h("div", { style: {
display: 'flex',
overflowX: 'auto',
overflowY: 'hidden',
WebkitOverflowScrolling: 'touch',
} }, this.products.map(item => (h("collective-widget-product-cell", { style: { flexShrink: '0' }, showSalePrice: this.showSalePrice, showBrand: this.showBrand, imageSize: this.imageSize, showPrice: this.showPrice, showInfoOnHover: this.showInfoOnHover, productId: item })))));
}
static get is() { return "collective-products"; }
static get properties() { return {
"columns": {
"type": Number,
"attr": "columns"
},
"element": {
"elementRef": true
},
"imageSize": {
"type": Number,
"attr": "image-size"
},
"pid": {
"type": String,
"attr": "pid"
},
"products": {
"type": "Any",
"attr": "products"
},
"showBrand": {
"type": Boolean,
"attr": "show-brand"
},
"showInfoOnHover": {
"type": Boolean,
"attr": "show-info-on-hover"
},
"showPrice": {
"type": Boolean,
"attr": "show-price"
},
"showRetailer": {
"type": Boolean,
"attr": "show-retailer"
},
"showSalePrice": {
"type": Boolean,
"attr": "show-sale-price"
}
}; }
static get style() { return "/**style-placeholder:collective-products:**/"; }
}