UNPKG

@scalar/api-reference

Version:

Generate beautiful API references from OpenAPI documents

27 lines (26 loc) 866 B
import { defineComponent as a, computed as i, createElementBlock as c, createCommentVNode as s, openBlock as n, Fragment as l, renderList as m, createBlock as u, unref as d, withCtx as f, createTextVNode as p, toDisplayString as g } from "vue"; import B from "../../components/Badge/Badge.vue.js"; const h = /* @__PURE__ */ a({ __name: "XBadges", props: { position: {}, badges: {} }, setup(e) { const o = i(() => Array.isArray(e.badges) ? e.badges.filter( (t) => t.position === e.position || e.position === "after" && !t.position ) : []); return (t, k) => o.value.length ? (n(!0), c(l, { key: 0 }, m(o.value, (r) => (n(), u(d(B), { key: r.name, color: r.color }, { default: f(() => [ p(g(r.name), 1) ]), _: 2 }, 1032, ["color"]))), 128)) : s("", !0); } }); export { h as default };