UNPKG

@scalar/api-client

Version:

the open source API testing client

40 lines (39 loc) 1.36 kB
import { defineComponent as r, createBlock as c, openBlock as i, resolveDynamicComponent as m, normalizeClass as t, unref as e, withCtx as l, renderSlot as a, createElementVNode as d, createVNode as u } from "vue"; import { ScalarIcon as f } from "@scalar/components"; import { useLayout as p } from "../../hooks/useLayout.js"; const h = /* @__PURE__ */ r({ __name: "SideNavLink", props: { is: {}, active: { type: Boolean }, icon: {} }, setup(n) { const { layout: o } = p(); return (s, b) => (i(), c(m(n.is ?? "a"), { class: t(["hover:bg-b-3 hover:dark:bg-b-2 flex max-w-[37px] min-w-[37px] items-center justify-center rounded-lg p-2 no-underline", { "bg-b-3 dark:bg-b-2 text-c-1 transition-none hover:cursor-default": n.active, "sm:max-w-max sm:min-w-max sm:rounded sm:py-1.5": e(o) === "web" }]) }, { default: l(() => [ a(s.$slots, "icon", {}, () => [ u(e(f), { class: t(e(o) === "web" ? "sm:hidden" : ""), icon: n.icon, thickness: "1.5" }, null, 8, ["class", "icon"]) ]), d("span", { class: t(["sr-only text-sm font-medium", { "sm:not-sr-only": e(o) === "web" }]) }, [ a(s.$slots, "default") ], 2) ]), _: 3 }, 8, ["class"])); } }); export { h as default };