refactor: inline table of contents

This commit is contained in:
iCrawl
2022-08-17 23:21:23 +02:00
parent 872ce801a0
commit 17ab0e652c
14 changed files with 97 additions and 90 deletions

View File

@@ -1,4 +1,4 @@
import { Anchor, Box, Text } from '@mantine/core';
import { Anchor, Box, Code, Text } from '@mantine/core';
import { DocNodeKind, StandardTags } from '@microsoft/tsdoc';
import Link from 'next/link';
import type { ReactNode } from 'react';
@@ -61,9 +61,9 @@ export function TSDoc({ node }: { node: AnyDocNodeJSON }): JSX.Element {
case DocNodeKind.CodeSpan: {
const { code } = node as DocFencedCodeJSON;
return (
<pre key={idx} className="inline">
<Code key={idx} sx={{ display: 'inline' }} className="text-sm font-mono">
{code}
</pre>
</Code>
);
}
case DocNodeKind.FencedCode: {