revert: "refactor(website): use mantine code blocks" (#8514)

This commit is contained in:
Noel
2022-08-17 23:04:47 +02:00
committed by GitHub
parent 0bf3df30da
commit 872ce801a0
4 changed files with 23 additions and 38 deletions

View File

@@ -1,8 +1,9 @@
import { Group, Stack, Title, Text, Box } from '@mantine/core';
import { useMediaQuery } from '@mantine/hooks';
import { Prism } from '@mantine/prism';
import type { ReactNode } from 'react';
import { VscListSelection, VscSymbolParameter } from 'react-icons/vsc';
import { PrismAsyncLight as SyntaxHighlighter } from 'react-syntax-highlighter';
import { vscDarkPlus } from 'react-syntax-highlighter/dist/cjs/styles/prism';
import { HyperlinkedText } from './HyperlinkedText';
import { Section } from './Section';
import { TypeParamTable } from './TypeParamTable';
@@ -50,9 +51,14 @@ export function DocContainer({
</Section>
<Box px="xs" pb="xs">
<Prism language="typescript" colorScheme="dark">
<SyntaxHighlighter
wrapLongLines
language="typescript"
style={vscDarkPlus}
codeTagProps={{ style: { fontFamily: 'JetBrains Mono' } }}
>
{excerpt}
</Prism>
</SyntaxHighlighter>
</Box>
{extendsTokens?.length ? (