@scalar/api-client
Version:
the open source API testing client
54 lines (53 loc) • 2.01 kB
JavaScript
import { defineComponent as c, createElementBlock as a, openBlock as d, createElementVNode as n, createVNode as i, normalizeStyle as p, toDisplayString as v, unref as t } from "vue";
import { ScalarIconButton as r } from "@scalar/components";
import { ScalarIconNotePencil as u, ScalarIconTrash as f } from "@scalar/icons";
import y from "./EnvironmentVariablesTable.vue.js";
const _ = { class: "group rounded-lg border" }, b = { class: "bg-b-2 flex justify-between rounded-t-lg px-1 py-1 text-sm" }, g = { class: "flex items-center gap-1" }, h = { class: "flex h-6 w-6 items-center justify-center p-1" }, N = { class: "px-1 py-0.5 text-sm" }, B = { class: "hidden flex-row items-center gap-1 group-hover:flex" }, w = /* @__PURE__ */ c({
__name: "Environment",
props: {
environment: {},
environmentName: {},
eventBus: {},
collectionType: {}
},
emits: ["edit", "delete"],
setup(E, { emit: s }) {
const l = s;
return (e, o) => (d(), a("div", _, [
n("div", b, [
n("div", g, [
n("div", h, [
n("span", {
class: "h-2.5 w-2.5 rounded-full",
style: p({ backgroundColor: e.environment.color })
}, null, 4)
]),
n("span", N, v(e.environmentName), 1)
]),
n("div", B, [
i(t(r), {
icon: t(u),
label: "Edit Environment",
size: "sm",
onClick: o[0] || (o[0] = (m) => l("edit"))
}, null, 8, ["icon"]),
i(t(r), {
icon: t(f),
label: "Delete Environment",
size: "sm",
onClick: o[1] || (o[1] = (m) => l("delete"))
}, null, 8, ["icon"])
])
]),
i(y, {
collectionType: e.collectionType,
environment: e.environment,
environmentName: e.environmentName,
eventBus: e.eventBus
}, null, 8, ["collectionType", "environment", "environmentName", "eventBus"])
]));
}
});
export {
w as default
};