@lobehub/ui
Version:
Lobe UI is an open-source UI component library for building AIGC web apps
35 lines (34 loc) • 912 B
JavaScript
"use client";
import FlexBasic_default from "../../Flex/FlexBasic.mjs";
import Text from "../../Text/Text.mjs";
import { memo } from "react";
import { jsx, jsxs } from "react/jsx-runtime";
//#region src/Mermaid/SyntaxMermaid/MermaidFallback.tsx
const MermaidFallback = memo(({ children, className, message, style }) => /* @__PURE__ */ jsx("div", {
className,
style,
children: /* @__PURE__ */ jsxs(FlexBasic_default, {
gap: 8,
padding: 16,
children: [/* @__PURE__ */ jsx(Text, {
fontSize: 12,
type: "secondary",
children: message
}), /* @__PURE__ */ jsx(Text, {
code: true,
as: "pre",
fontSize: 12,
style: {
margin: 0,
overflowX: "auto",
whiteSpace: "pre-wrap",
wordBreak: "break-word"
},
children
})]
})
}));
MermaidFallback.displayName = "MermaidFallback";
//#endregion
export { MermaidFallback as default };
//# sourceMappingURL=MermaidFallback.mjs.map