@empathyco/x-components
Version:
Empathy X Components
79 lines (76 loc) • 2.77 kB
JavaScript
import _sfc_main from './sliding-panel.vue2.js';
import { openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, Fragment, createTextVNode, createCommentVNode } from 'vue';
import './sliding-panel.vue3.js';
import _export_sfc from '../_virtual/_plugin-vue_export-helper.js';
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return _ctx.slots.default ? (openBlock(), createElementBlock(
"div",
{
key: 0,
class: normalizeClass(["x-sliding-panel", _ctx.cssClasses]),
"data-test": "sliding-panel"
},
[
createElementVNode(
"div",
{
ref: "scrollContainerRef",
class: normalizeClass([_ctx.scrollContainerClass, "x-sliding-panel__scroll"]),
"data-test": "sliding-panel-scroll"
},
[
renderSlot(_ctx.$slots, "default", {}, void 0, true)
],
2
/* CLASS */
),
renderSlot(_ctx.$slots, "sliding-panel-addons", {
arrivedState: _ctx.arrivedState,
scroll: _ctx.xScroll
}, void 0, true),
_ctx.showButtons ? (openBlock(), createElementBlock(
Fragment,
{ key: 0 },
[
createElementVNode(
"button",
{
class: normalizeClass(["x-sliding-panel__button x-button x-sliding-panel-button-left", _ctx.buttonClass]),
"data-test": "sliding-panel-left-button",
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.xScroll -= _ctx.slotContainerWidth * _ctx.scrollFactor)
},
[
renderSlot(_ctx.$slots, "sliding-panel-left-button", {}, () => [
createTextVNode("ᐸ")
], true)
],
2
/* CLASS */
),
createElementVNode(
"button",
{
class: normalizeClass(["x-sliding-panel__button x-button x-sliding-panel-button-right", _ctx.buttonClass]),
"data-test": "sliding-panel-right-button",
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.xScroll += _ctx.slotContainerWidth * _ctx.scrollFactor)
},
[
renderSlot(_ctx.$slots, "sliding-panel-right-button", {}, () => [
createTextVNode("ᐳ")
], true)
],
2
/* CLASS */
)
],
64
/* STABLE_FRAGMENT */
)) : createCommentVNode("v-if", true)
],
2
/* CLASS */
)) : createCommentVNode("v-if", true);
}
var SlidingPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-9402d5ce"]]);
export { SlidingPanel as default };
//# sourceMappingURL=sliding-panel.vue.js.map