UNPKG

@scalar/api-client

Version:

the open source API testing client

45 lines (44 loc) 1.51 kB
import { defineComponent as a, createElementBlock as d, openBlock as r, withModifiers as l, withKeys as m, createElementVNode as t, normalizeProps as p, guardReactiveProps as f, unref as n, renderSlot as s, createVNode as u, withCtx as x, createTextVNode as b } from "vue"; import { useBindCx as c, ScalarButton as g } from "@scalar/components"; const v = { class: "flex gap-2" }, w = { class: "flex max-h-8 flex-1" }, h = /* @__PURE__ */ a({ __name: "CommandActionForm", props: { loading: {}, disabled: { type: Boolean, default: !1 } }, emits: ["submit", "cancel", "back"], setup(B) { const { cx: i } = c(); return (e, o) => (r(), d("form", { class: "flex w-full flex-col gap-3", onKeydown: o[0] || (o[0] = m(l(() => { }, ["stop"]), ["enter"])), onSubmit: o[1] || (o[1] = l((C) => e.$emit("submit"), ["prevent", "stop"])) }, [ t("div", p(f(n(i)("relative flex min-h-20 flex-col rounded"))), [ s(e.$slots, "default") ], 16), t("div", v, [ t("div", w, [ s(e.$slots, "options") ]), u(n(g), { class: "max-h-8 p-0 px-3 text-xs", disabled: e.disabled, loading: e.loading, type: "submit" }, { default: x(() => [ s(e.$slots, "submit", {}, () => [ o[2] || (o[2] = b("Continue")) ]) ]), _: 3 }, 8, ["disabled", "loading"]) ]) ], 32)); } }); export { h as default };