@maxigalaxi/vue-status-indicator
Version:
A simple, customizable status indicator component for Vue 3
41 lines (40 loc) • 870 B
JavaScript
import { openBlock as a, createElementBlock as i, normalizeClass as c } from "vue";
const r = (t, n) => {
const e = t.__vccOpts || t;
for (const [s, o] of n)
e[s] = o;
return e;
}, l = {
name: "StatusIndicator",
props: {
status: {
type: String,
default: "positive",
validator: (t) => ["positive", "negative", "active", "intermediary"].includes(
t
)
},
pulse: {
type: Boolean,
default: !1
},
tooltip: {
type: String,
default: ""
}
}
}, u = ["title"];
function _(t, n, e, s, o, d) {
return a(), i("span", {
class: c(["status-indicator", e.status, { pulse: e.pulse }]),
title: e.tooltip
}, null, 10, u);
}
const p = /* @__PURE__ */ r(l, [["render", _]]);
const v = (t) => {
t.component("StatusIndicator", p);
};
export {
p as StatusIndicator,
v as install
};