UNPKG

@empathyco/x-components

Version:
42 lines (39 loc) 1.41 kB
import _sfc_main from './query-preview.vue2.js'; import { openBlock, createElementBlock, Fragment, renderList, renderSlot, createElementVNode, toDisplayString, createCommentVNode } from 'vue'; import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.js'; const _hoisted_1 = { key: 0, "data-test": "query-preview", class: "x-query-preview" }; const _hoisted_2 = { "data-test": "result-name" }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return _ctx.hasResults ? (openBlock(), createElementBlock("ul", _hoisted_1, [ (openBlock(true), createElementBlock( Fragment, null, renderList(_ctx.queryPreviewResults?.results, (result) => { return openBlock(), createElementBlock("li", { key: result.id, class: "x-query-preview__item", "data-test": "query-preview-item" }, [ renderSlot(_ctx.$slots, "result", { result }, () => [ createElementVNode( "span", _hoisted_2, toDisplayString(result.name), 1 /* TEXT */ ) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ])) : createCommentVNode("v-if", true); } var QueryPreview = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); export { QueryPreview as default }; //# sourceMappingURL=query-preview.vue.js.map