From 72150d0517b753d6b792f4406f6d138546ca5681 Mon Sep 17 00:00:00 2001 From: Steven Petryk Date: Mon, 26 Feb 2024 22:20:34 -0800 Subject: [PATCH] Fix --- docs/components/CodeAndExample.tsx | 6 +++--- docs/guide-example-loader.mjs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/components/CodeAndExample.tsx b/docs/components/CodeAndExample.tsx index 7ade5928..859b7e89 100644 --- a/docs/components/CodeAndExample.tsx +++ b/docs/components/CodeAndExample.tsx @@ -18,11 +18,11 @@ function CodeAndExample({ collapsible: collapsibleProp = true, example, clean = const typedExample = example as { $component: React.ComponentType $source: string - $reactNode: React.ReactNode + $highlightedSource: React.ReactNode } const Component = typedExample.$component let source = typedExample.$source - const reactNode = typedExample.$reactNode + const highlightedSource = typedExample.$highlightedSource if (typeof Component !== "function") { throw new Error(`CodeAndExample: expected example to be a component ${source}`) @@ -78,7 +78,7 @@ function CodeAndExample({ collapsible: collapsibleProp = true, example, clean = `} >
-                {reactNode}
+                {highlightedSource}
               
diff --git a/docs/guide-example-loader.mjs b/docs/guide-example-loader.mjs index ca14f7a2..f1b09b39 100644 --- a/docs/guide-example-loader.mjs +++ b/docs/guide-example-loader.mjs @@ -60,7 +60,7 @@ export default async function guideExampleLoader(source) { $default.$source = ${JSON.stringify(cleanedSource)}; $default.$component = $default; - $default.$reactNode = toJsxRuntime(${JSON.stringify(tree)}, { Fragment, jsx, jsxs }); + $default.$highlightedSource = toJsxRuntime(${JSON.stringify(tree)}, { Fragment, jsx, jsxs }); export default $default; ` }