reka-ui
Version:
Vue port for Radix UI Primitives.
34 lines (30 loc) • 1.08 kB
JavaScript
;
const vue = require('vue');
const shared_useForwardExpose = require('../shared/useForwardExpose.cjs');
const Listbox_ListboxItem = require('./ListboxItem.cjs');
const Primitive_Primitive = require('../Primitive/Primitive.cjs');
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
__name: "ListboxItemIndicator",
props: {
asChild: { type: Boolean },
as: { default: "span" }
},
setup(__props) {
const props = __props;
shared_useForwardExpose.useForwardExpose();
const itemContext = Listbox_ListboxItem.injectListboxItemContext();
return (_ctx, _cache) => {
return vue.unref(itemContext).isSelected.value ? (vue.openBlock(), vue.createBlock(vue.unref(Primitive_Primitive.Primitive), vue.mergeProps({
key: 0,
"aria-hidden": "true"
}, props), {
default: vue.withCtx(() => [
vue.renderSlot(_ctx.$slots, "default")
]),
_: 3
}, 16)) : vue.createCommentVNode("", true);
};
}
});
exports._sfc_main = _sfc_main;
//# sourceMappingURL=ListboxItemIndicator.cjs.map