@ark-ui/vue
Version:
A collection of unstyled, accessible UI components for Vue, utilizing state machines for seamless interaction.
26 lines (23 loc) • 897 B
JavaScript
import { defineComponent, createBlock, createCommentVNode, unref, openBlock, mergeProps, withCtx, renderSlot } from 'vue';
import { ark } from '../factory.js';
import { useTourContext } from './use-tour-context.js';
import { useForwardExpose } from '../../utils/use-forward-expose.js';
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "tour-arrow",
props: {
asChild: { type: Boolean }
},
setup(__props) {
const tour = useTourContext();
useForwardExpose();
return (_ctx, _cache) => {
return unref(tour).step?.arrow ? (openBlock(), createBlock(unref(ark).div, mergeProps({ key: 0 }, unref(tour).getArrowProps(), { "as-child": _ctx.asChild }), {
default: withCtx(() => [
renderSlot(_ctx.$slots, "default")
]),
_: 3
}, 16, ["as-child"])) : createCommentVNode("", true);
};
}
});
export { _sfc_main as default };