chore: move website and guide out of packages

This commit is contained in:
iCrawl
2022-10-10 01:22:48 +02:00
parent 0a9d57b011
commit 3ed668e539
175 changed files with 428 additions and 487 deletions

View File

@@ -0,0 +1,31 @@
import { PrismAsyncLight } from 'react-syntax-highlighter';
import { vscDarkPlus, prism } from 'react-syntax-highlighter/dist/cjs/styles/prism';
export function SyntaxHighlighter({ language = 'typescript', code }: { code: string; language?: string }) {
return (
<>
<div data-theme="dark">
<PrismAsyncLight
codeTagProps={{ style: { fontFamily: 'JetBrains Mono' } }}
language={language}
style={vscDarkPlus}
wrapLines
wrapLongLines
>
{code}
</PrismAsyncLight>
</div>
<div data-theme="light">
<PrismAsyncLight
codeTagProps={{ style: { fontFamily: 'JetBrains Mono' } }}
language={language}
style={prism}
wrapLines
wrapLongLines
>
{code}
</PrismAsyncLight>
</div>
</>
);
}