@scalar/api-client
Version:
the open source API testing client
26 lines (25 loc) • 989 B
JavaScript
import { defineComponent as u, createElementBlock as r, openBlock as d, createElementVNode as o, withModifiers as l, normalizeClass as n } from "vue";
const a = { class: "text-c-3 text-xxs -my-1 flex justify-center gap-0.5 rounded p-0.5" }, i = /* @__PURE__ */ u({
__name: "ResponseBodyToggle",
props: {
modelValue: { type: Boolean }
},
emits: ["update:modelValue"],
setup(p) {
return (e, t) => (d(), r("div", a, [
o("button", {
class: n(["hover:bg-b-3 rounded px-1", { "bg-b-3 text-c-1 cursor-default": e.modelValue }]),
type: "button",
onClick: t[0] || (t[0] = l((s) => e.$emit("update:modelValue", !0), ["stop"]))
}, " Preview ", 2),
o("button", {
class: n(["hover:bg-b-3 rounded px-1", { "bg-b-3 text-c-1 cursor-default": !e.modelValue }]),
type: "button",
onClick: t[1] || (t[1] = l((s) => e.$emit("update:modelValue", !1), ["stop"]))
}, " Raw ", 2)
]));
}
});
export {
i as default
};