@scalar/api-reference
Version:
Generate beautiful API references from OpenAPI documents
29 lines (28 loc) • 1.11 kB
JavaScript
import { defineComponent as t, createElementBlock as a, openBlock as c, createVNode as i, createElementVNode as s, unref as e, toDisplayString as l, renderSlot as d } from "vue";
import { ScalarIconButton as m } from "@scalar/components";
import { ScalarIconX as p, ScalarIconList as u } from "@scalar/icons";
import { useSidebar as b } from "../v2/blocks/scalar-sidebar-block/hooks/useSidebar.js";
const _ = { class: "references-mobile-header t-doc__header" }, f = { class: "references-mobile-breadcrumbs" }, S = { class: "references-mobile-header-actions" }, M = /* @__PURE__ */ t({
__name: "MobileHeader",
props: {
breadcrumb: {}
},
setup(h) {
const { isSidebarOpen: o } = b();
return (r, n) => (c(), a("div", _, [
i(e(m), {
icon: e(o) ? e(p) : e(u),
label: e(o) ? "Close Menu" : "Open Menu",
size: "md",
onClick: n[0] || (n[0] = (v) => o.value = !e(o))
}, null, 8, ["icon", "label"]),
s("span", f, l(r.breadcrumb), 1),
s("div", S, [
d(r.$slots, "actions", {}, void 0, !0)
])
]));
}
});
export {
M as default
};