@liveblocks/react-ui
Version:
A set of React pre-built components for the Liveblocks products. Liveblocks is the all-in-one toolkit to build collaborative products like Figma, Notion, and more.
36 lines (33 loc) • 861 B
JavaScript
import { jsx } from 'react/jsx-runtime';
import { useComponents } from '../../components.js';
import { Markdown } from '../../primitives/Markdown.js';
import { cn } from '../../utils/cn.js';
import { CodeBlock as CodeBlock$1 } from './CodeBlock.js';
function Link({ href, title, children }) {
const { Anchor } = useComponents();
return /* @__PURE__ */ jsx(Anchor, {
href,
title,
children
});
}
function CodeBlock({ language, code }) {
return /* @__PURE__ */ jsx(CodeBlock$1, {
title: language || "Plain text",
code
});
}
const markdownComponents = {
Link,
CodeBlock
};
function Prose({ content, className, ...props }) {
return /* @__PURE__ */ jsx(Markdown, {
content,
components: markdownComponents,
className: cn("lb-prose", className),
...props
});
}
export { Prose };
//# sourceMappingURL=Prose.js.map