Files
tyx_AI_xhs/apps/web/src/toolchain-probe.tsx
T

22 lines
503 B
TypeScript

import { Rect, version as fabricVersion } from "fabric";
import { renderToStaticMarkup } from "react-dom/server";
export function ToolchainProbe() {
return <canvas aria-label="Dada toolchain probe" height={16} width={16} />;
}
export function renderToolchainProbe() {
const reactMarkup = renderToStaticMarkup(<ToolchainProbe />);
const fabricSvg = new Rect({
fill: "#111111",
height: 16,
width: 16,
}).toSVG();
return {
fabricSvg,
fabricVersion,
reactMarkup,
};
}