UNPKG

@empathyco/x-components

Version:
43 lines (40 loc) 1.58 kB
import _sfc_main from './sort-dropdown.vue2.js'; import { resolveComponent, openBlock, createBlock, withCtx, renderSlot, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString } from 'vue'; import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.js'; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { const _component_BaseDropdown = resolveComponent("BaseDropdown"); return openBlock(), createBlock(_component_BaseDropdown, { ref: "rootRef", items: _ctx.items, "model-value": _ctx.selectedSort, animation: _ctx.animation, class: "x-sort-dropdown", "data-test": "sort-dropdown", "aria-label": "Select sorting", "onUpdate:modelValue": _ctx.emitUserClickedASort }, { toggle: withCtx(({ isOpen, item }) => [ renderSlot(_ctx.$slots, "toggle", normalizeProps(guardReactiveProps({ isOpen, item })), () => [ createTextVNode( toDisplayString(item), 1 /* TEXT */ ) ]) ]), item: withCtx(({ item, isHighlighted, isSelected }) => [ renderSlot(_ctx.$slots, "item", normalizeProps(guardReactiveProps({ item, isHighlighted, isSelected })), () => [ createTextVNode( toDisplayString(item), 1 /* TEXT */ ) ]) ]), _: 3 /* FORWARDED */ }, 8, ["items", "model-value", "animation", "onUpdate:modelValue"]); } var sortDropdown = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); export { sortDropdown as default }; //# sourceMappingURL=sort-dropdown.vue.js.map