Fix the example in installation.mdx

This commit is contained in:
Yeger 2024-05-23 20:37:33 +03:00 committed by GitHub
parent a71bb63d1f
commit f6a623ebbe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,8 +22,9 @@ Once the library is installed, its ready to use.
import { parseMermaidToExcalidraw } from "@excalidraw/mermaid-to-excalidraw";
import { convertToExcalidrawElements} from "@excalidraw/excalidraw"
const DEFAULT_FONT_SIZE = 20;
try {
const { elements, files } = await parseMermaid(diagramDefinition, {
const { elements, files } = await parseMermaidToExcalidraw(diagramDefinition, {
fontSize: DEFAULT_FONT_SIZE,
});
// currently the elements returned from the parser are in a "skeleton" format