@techolution-ai/computer-vision
Version:
A JavaScript/TypeScript library for computer vision applications, providing tools for image processing, scanning, and MQTT-based messaging.
69 lines (68 loc) • 2.51 kB
JavaScript
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/scanner/status-item.tsx
var status_item_exports = {};
__export(status_item_exports, {
default: () => status_item_default
});
module.exports = __toCommonJS(status_item_exports);
var import_utils = require("../helpers/utils.cjs");
var import_jsx_runtime = require("react/jsx-runtime");
var StatusItem = ({ message, icon, render, slotProps = {} }) => {
const renderStatusItem = render?.();
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"div",
{
...slotProps.root,
className: (0, import_utils.combineClassNames)("status_root", slotProps.root?.className),
children: renderStatusItem ? renderStatusItem : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
"div",
{
...slotProps.container,
className: (0, import_utils.combineClassNames)(
"status_icon_text_container",
slotProps.container?.className
),
children: [
icon && (typeof icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"img",
{
src: icon,
...slotProps.icon,
style: { width: 40, height: 40, ...slotProps.icon?.style }
}
) : icon),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"p",
{
...slotProps.message,
className: (0, import_utils.combineClassNames)(
"status_message_style",
slotProps.message?.className
),
children: message
}
)
]
}
)
}
);
};
var status_item_default = StatusItem;
//# sourceMappingURL=status-item.cjs.map