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