) {
<>
{/* @ts-ignore */}
-
+
{props.children}
diff --git a/www/src/components/CodeSnippet/index.tsx b/www/src/components/CodeSnippet/index.tsx
index 1695a3b1..f086cc1d 100644
--- a/www/src/components/CodeSnippet/index.tsx
+++ b/www/src/components/CodeSnippet/index.tsx
@@ -14,7 +14,7 @@ export type CodeSnippetProps = {
file?: string;
lang?: string;
files: SandpackInputFile[];
- highlightLines?: string;
+ highlightLines?: number[];
importedPackages?: string[];
viewMode?: 'code' | 'preview' | 'both';
cwd?: string;
@@ -63,7 +63,11 @@ export function CodeSnippet(props: CodeSnippetProps) {
}
return (
-
+
{files[0]?.code}
);
diff --git a/www/src/components/SyntaxHighlight/SyntaxHighlight.tsx b/www/src/components/SyntaxHighlight/SyntaxHighlight.tsx
index babe6e83..481f6804 100644
--- a/www/src/components/SyntaxHighlight/SyntaxHighlight.tsx
+++ b/www/src/components/SyntaxHighlight/SyntaxHighlight.tsx
@@ -28,11 +28,11 @@ function Mermaid({ chart }: { chart: string }) {
}
interface SyntaxHighlightProps {
- file: string;
- title: string;
+ file?: string;
+ title?: string;
children: string;
className?: string;
- highlightLines: number[];
+ highlightLines?: number[];
noMargin?: boolean;
noMarkers?: boolean;
}