UNPKG

@scalar/api-client

Version:

the open source API testing client

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