UNPKG

@seemusic/ui-components

Version:

A Vue 3 UI Library. Uses Composable.

44 lines (43 loc) 1.02 kB
import { defineComponent, computed, createVNode } from "vue"; const SopStatus = /* @__PURE__ */ defineComponent({ name: "SopStatus", props: { type: { type: String, default: "primary", validator(value) { return ["primary", "warning", "info", "danger", "all", "success"].indexOf(value) !== -1; } }, color: { type: String, default: "" }, text: { type: String, default: "" } }, setup(props) { const iconColorStyle = computed(() => { if (props.color !== "") { return { backgroundColor: props.color }; } return {}; }); return () => createVNode("span", { "class": "sop-status" }, [createVNode("i", { "class": `sop-status__icon--${props.type}`, "style": iconColorStyle.value }, null), props.text && createVNode("em", { "class": "sop-status__text" }, [props.text])]); } }); export { SopStatus as default }; //# sourceMappingURL=SopStatus.mjs.map