@empathyco/x-components
Version:
Empathy X Components
42 lines (39 loc) • 1.66 kB
JavaScript
import _sfc_main from './highlight.vue2.js';
import { openBlock, createElementBlock, normalizeClass, toDisplayString, createCommentVNode } from 'vue';
import _export_sfc from '../_virtual/_plugin-vue_export-helper.js';
const _hoisted_1 = ["textContent"];
const _hoisted_2 = ["textContent"];
const _hoisted_3 = ["textContent"];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock(
"span",
{
class: normalizeClass(["x-highlight", _ctx.dynamicCSSClasses])
},
[
_ctx.matchParts.start ? (openBlock(), createElementBlock("span", {
key: 0,
class: "x-highlight__text",
"data-test": "highlight-start",
textContent: toDisplayString(_ctx.matchParts.start)
}, null, 8, _hoisted_1)) : createCommentVNode("v-if", true),
_ctx.hasMatch ? (openBlock(), createElementBlock("span", {
key: 1,
class: normalizeClass(["x-highlight__text x-highlight-text-match", _ctx.matchingPartClass]),
"data-test": "matching-part",
textContent: toDisplayString(_ctx.matchParts.match)
}, null, 10, _hoisted_2)) : createCommentVNode("v-if", true),
_ctx.matchParts.end ? (openBlock(), createElementBlock("span", {
key: 2,
class: "x-highlight__text",
"data-test": "highlight-end",
textContent: toDisplayString(_ctx.matchParts.end)
}, null, 8, _hoisted_3)) : createCommentVNode("v-if", true)
],
2
/* CLASS */
);
}
var Highlight = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export { Highlight as default };
//# sourceMappingURL=highlight.vue.js.map