@empathyco/x-components
Version:
Empathy X Components
111 lines (108 loc) • 3.22 kB
JavaScript
import _sfc_main from './result.vue2.js';
import { resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, createTextVNode, toDisplayString } from 'vue';
import _export_sfc from '../../_virtual/_plugin-vue_export-helper.js';
const _hoisted_1 = {
class: "x-result",
style: { "max-width": "300px", "overflow": "hidden" }
};
const _hoisted_2 = /* @__PURE__ */ createElementVNode(
"div",
{ style: { "padding-top": "100%", "background-color": "lightgray" } },
null,
-1
/* HOISTED */
);
const _hoisted_3 = /* @__PURE__ */ createElementVNode(
"div",
{
"data-test": "result-picture-fallback",
style: { "padding-top": "100%", "background-color": "lightsalmon" }
},
null,
-1
/* HOISTED */
);
const _hoisted_4 = /* @__PURE__ */ createElementVNode(
"span",
null,
"Add to cart",
-1
/* HOISTED */
);
const _hoisted_5 = { class: "x-result__description" };
const _hoisted_6 = {
class: "x-text1 x-text1-lg",
"data-test": "result-title"
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
const _component_BaseResultImage = resolveComponent("BaseResultImage");
const _component_BaseResultLink = resolveComponent("BaseResultLink");
const _component_BaseResultAddToCart = resolveComponent("BaseResultAddToCart");
const _component_BaseResultRating = resolveComponent("BaseResultRating");
return openBlock(), createElementBlock("article", _hoisted_1, [
createVNode(_component_BaseResultLink, { result: _ctx.result }, {
default: withCtx(() => [
createVNode(_component_BaseResultImage, {
result: _ctx.result,
"load-animation": _ctx.crossFade
}, {
placeholder: withCtx(() => [
_hoisted_2
]),
fallback: withCtx(() => [
_hoisted_3
]),
_: 1
/* STABLE */
}, 8, ["result", "load-animation"])
]),
_: 1
/* STABLE */
}, 8, ["result"]),
createElementVNode("div", null, [
createVNode(_component_BaseResultAddToCart, {
result: _ctx.result,
"data-test": "add-to-cart"
}, {
default: withCtx(() => [
_hoisted_4
]),
_: 1
/* STABLE */
}, 8, ["result"])
]),
createElementVNode("div", _hoisted_5, [
createVNode(_component_BaseResultRating, {
result: _ctx.result,
max: 5,
link: "#",
class: "x-text1 x-text1-sm"
}, {
"filled-icon": withCtx(() => [
createTextVNode("❤️")
]),
"empty-icon": withCtx(() => [
createTextVNode("🤍")
]),
_: 1
/* STABLE */
}, 8, ["result"]),
createVNode(_component_BaseResultLink, { result: _ctx.result }, {
default: withCtx(() => [
createElementVNode(
"h1",
_hoisted_6,
toDisplayString(_ctx.result.name),
1
/* TEXT */
)
]),
_: 1
/* STABLE */
}, 8, ["result"])
])
]);
}
var Result = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export { Result as default };
//# sourceMappingURL=result.vue.js.map