UNPKG

@scalar/api-client

Version:

the open source API testing client

47 lines (46 loc) 1.6 kB
import { defineComponent as m, computed as p, createElementBlock as o, openBlock as t, Fragment as u, renderList as d, createBlock as f, unref as h, withCtx as x, createElementVNode as n, normalizeClass as k, toDisplayString as v, capitalize as _ } from "vue"; import { RouterLink as b } from "vue-router"; const w = { class: "flex w-full gap-2 border-b pl-1.5 md:ml-1.5 md:pl-0" }, g = ["href", "onClick"], z = /* @__PURE__ */ m({ __name: "Tabs", props: { type: {} }, setup(r) { const s = p( () => r.type === "workspace" ? ["environment", "cookies", "settings"] : [ "overview", "servers", "authentication", "environment", "cookies", "settings" ] ); return (c, y) => (t(), o("div", w, [ (t(!0), o(u, null, d(s.value, (e) => (t(), f(h(b), { key: e, custom: "", to: { name: `${c.type}.${e}` } }, { default: x(({ isActive: i, href: l, navigate: a }) => [ n("a", { class: "-ml-2 flex h-10 cursor-pointer items-center px-2 text-center text-sm font-medium whitespace-nowrap no-underline -outline-offset-1 has-[:focus-visible]:outline", href: l, onClick: a }, [ n("span", { class: k([ "flex-center hover:text-c-1 h-full border-b", i ? "text-c-1 border-c-1" : "text-c-2 hover:text-c-1 border-transparent" ]) }, v(_(e)), 3) ], 8, g) ]), _: 2 }, 1032, ["to"]))), 128)) ])); } }); export { z as default };