@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 f, openBlock as d, unref as p, withCtx as C, createElementVNode as v, createVNode as a } 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" }, B = /* @__PURE__ */ m({
__name: "EnvironmentColorModal",
props: {
state: {},
selectedColor: {}
},
emits: ["cancel", "submit"],
setup(t, { emit: r }) {
const c = t, o = r, e = u(""), s = (l) => {
e.value = l;
}, i = () => {
o("submit", e.value), e.value = "";
};
return (l, n) => (d(), f(p(_), {
size: "xxs",
state: t.state,
title: "Edit Environment Color"
}, {
default: C(() => [
v("div", b, [
a(S, {
activeColor: e.value || c.selectedColor,
class: "w-full p-1",
onSelect: s
}, null, 8, ["activeColor"]),
a(x, {
onCancel: n[0] || (n[0] = (E) => o("cancel")),
onSubmit: i
})
])
]),
_: 1
}, 8, ["state"]));
}
});
export {
B as default
};