@scalar/api-client
Version:
the open source API testing client
43 lines (42 loc) • 1.23 kB
JavaScript
import { defineComponent as m, ref as u, createBlock as d, openBlock as f, unref as p, withCtx as C, createElementVNode as v, createVNode as n } from "vue";
import { ScalarModal as _ } from "@scalar/components";
import x from "../../components/Sidebar/Actions/SidebarListElementForm.vue.js";
import S from "./EnvironmentColors.vue.js";
const b = { class: "flex flex-col gap-4" }, M = /* @__PURE__ */ m({
__name: "EnvironmentColorModal",
props: {
state: {},
selectedColor: {}
},
emits: ["cancel", "submit"],
setup(r, { emit: a }) {
const s = r, o = a, e = u(""), c = (t) => {
e.value = t;
}, i = () => {
o("submit", e.value), e.value = "";
};
return (t, l) => (f(), d(p(_), {
size: "xxs",
state: t.state,
title: "Edit Environment Color"
}, {
default: C(() => [
v("div", b, [
n(S, {
activeColor: e.value || s.selectedColor,
class: "w-full p-1",
onSelect: c
}, null, 8, ["activeColor"]),
n(x, {
onCancel: l[0] || (l[0] = (E) => o("cancel")),
onSubmit: i
})
])
]),
_: 1
}, 8, ["state"]));
}
});
export {
M as default
};