@scalar/api-client
Version:
the open source API testing client
46 lines (45 loc) • 1.52 kB
JavaScript
import { defineComponent as m, createElementBlock as p, openBlock as f, withModifiers as d, renderSlot as c, createElementVNode as v, createVNode as n, unref as a, withCtx as i, createTextVNode as l, toDisplayString as b } from "vue";
import { ScalarButton as r } from "@scalar/components";
const x = { class: "flex justify-between gap-10" }, S = /* @__PURE__ */ m({
__name: "ConfirmationForm",
props: {
label: { default: "Save" },
variant: { default: "solid" }
},
emits: ["cancel", "submit"],
setup(w, { emit: s }) {
const o = s;
return (t, e) => (f(), p("form", {
class: "flex flex-col gap-4 text-base",
onSubmit: e[1] || (e[1] = d((u) => o("submit"), ["prevent"]))
}, [
c(t.$slots, "default", {}, void 0, !0),
v("div", x, [
n(a(r), {
class: "flex h-8 cursor-pointer items-center gap-1.5 px-2.5 shadow-none focus:outline-none",
type: "button",
variant: "outlined",
onClick: e[0] || (e[0] = (u) => o("cancel"))
}, {
default: i(() => [...e[2] || (e[2] = [
l(" Cancel ", -1)
])]),
_: 1
}),
n(a(r), {
class: "custom-scroll h-8 gap-1.5 px-2.5 font-medium whitespace-nowrap shadow-none focus:outline-none",
type: "submit",
variant: t.variant
}, {
default: i(() => [
l(b(t.label), 1)
]),
_: 1
}, 8, ["variant"])
])
], 32));
}
});
export {
S as default
};