@scalar/api-reference
Version:
Generate beautiful API references from OpenAPI documents
24 lines (23 loc) • 733 B
JavaScript
import { defineComponent, useTemplateRef, createElementBlock, openBlock, renderSlot } from "vue";
import { useIntersection } from "../../hooks/use-intersection.js";
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "Section",
emits: ["intersecting"],
setup(__props, { emit: __emit }) {
const emit = __emit;
const section = useTemplateRef("section");
useIntersection(section, () => emit("intersecting"));
return (_ctx, _cache) => {
return openBlock(), createElementBlock("section", {
ref_key: "section",
ref: section,
class: "section"
}, [
renderSlot(_ctx.$slots, "default", {}, void 0, true)
], 512);
};
}
});
export {
_sfc_main as default
};