@glodon-aiot/react-components
Version:
aiot react components
28 lines (27 loc) • 542 B
JavaScript
import { jsx as n, Fragment as m } from "react/jsx-runtime";
import { useContext as x } from "react";
import { DrawableContext as a } from "./index.mjs";
function c(s) {
const {
start: o,
end: r
} = s, {
options: {
lineColor: t,
lineWidth: e
}
} = x(a);
return /* @__PURE__ */ n(m, {
children: /* @__PURE__ */ n("line", {
x1: o.x,
y1: o.y,
x2: r.x,
y2: r.y,
stroke: t != null ? t : "#FF5500",
strokeWidth: e != null ? e : 2
})
});
}
export {
c as default
};