UNPKG

@scalar/api-reference

Version:

Generate beautiful API references from OpenAPI documents

42 lines (41 loc) 1.34 kB
import { defineComponent as i, createElementBlock as r, createCommentVNode as o, openBlock as a, normalizeClass as l, unref as t, createVNode as m, createElementVNode as c, toDisplayString as s } from "vue"; import { cva as u } from "@scalar/components"; import { ScalarIconEnvelopeSimple as p } from "@scalar/icons"; const d = { key: 0, class: "group flex items-center last:border-r-0 xl:border-r xl:first:ml-auto" }, f = ["href"], v = { class: "ml-1 empty:hidden" }, y = /* @__PURE__ */ i({ __name: "Contact", props: { value: {} }, setup(h) { const n = u({ base: "text-c-1 mr-2 flex min-h-7 min-w-7 items-center rounded-lg border px-2 py-1 group-last:mr-0 xl:border-none", variants: { link: { true: "no-underline hover:bg-b-2" } } }); return (e, b) => e.value ? (a(), r("div", d, [ e.value?.email ? (a(), r("a", { key: 0, class: l(t(n)({ link: !0 })), href: `mailto:${e.value?.email}` }, [ m(t(p), { weight: "bold", class: "size-3 text-current" }), c("span", v, s(e.value.name), 1) ], 10, f)) : e.value?.name ? (a(), r("span", { key: 1, class: l(t(n)({ link: !1 })) }, s(e.value.name), 3)) : o("", !0) ])) : o("", !0); } }); export { y as default };