|
2 | 2 | Blockquote,
|
3 | 3 | Card,
|
4 | 4 | Em,
|
5 |
| - Flex, |
6 | 5 | Heading,
|
7 | 6 | Link,
|
8 | 7 | Strong,
|
@@ -34,38 +33,48 @@ export const TEXT_CLASSES = "text-[1.2rem] leading-[1.5em] tracking-normal";
|
34 | 33 |
|
35 | 34 | export function MDXWrapper(props: { children: React.ReactNode }) {
|
36 | 35 | return (
|
37 |
| - <Flex gap="3" direction="column"> |
| 36 | + <div className="prose prose-xl dark:prose-invert w-full max-w-full"> |
38 | 37 | {props.children}
|
39 |
| - </Flex> |
| 38 | + </div> |
| 39 | + ); |
| 40 | +} |
| 41 | +export function MDXSheetWrapper(props: { children: React.ReactNode }) { |
| 42 | + return ( |
| 43 | + <div className="prose prose-xl dark:prose-invert w-full max-w-full"> |
| 44 | + {props.children} |
| 45 | + </div> |
| 46 | + ); |
| 47 | +} |
| 48 | + |
| 49 | +export function Fields(props: { children: React.ReactNode }) { |
| 50 | + return ( |
| 51 | + <div className="flex w-full flex-col gap-4 py-4 [&_*]:m-0"> |
| 52 | + {props.children} |
| 53 | + </div> |
40 | 54 | );
|
41 | 55 | }
|
42 | 56 |
|
43 | 57 | export function getMdxComponents(arg: { allowH1s?: boolean } = {}) {
|
44 | 58 | const allowH1s = arg.allowH1s ?? true;
|
45 | 59 | return {
|
46 |
| - h1: allowH1s ? (MDXH1 as any) : (MDXH2 as any), |
47 |
| - h2: allowH1s ? (MDXH2 as any) : (MDXH3 as any), |
48 |
| - h3: allowH1s ? (MDXH3 as any) : (MDXH4 as any), |
49 |
| - h4: allowH1s ? (MDXH4 as any) : (MDXH5 as any), |
50 |
| - h5: allowH1s ? (MDXH5 as any) : (MDXH6 as any), |
51 |
| - h6: allowH1s ? (MDXH6 as any) : (MDXH6 as any), |
52 |
| - a: MDXA as any, |
| 60 | + h1: allowH1s ? "h1" : "h2", |
| 61 | + h2: allowH1s ? "h2" : "h3", |
| 62 | + h3: allowH1s ? "h3" : "h4", |
| 63 | + h4: allowH1s ? "h4" : "h5", |
| 64 | + h5: allowH1s ? "h5" : "h6", |
| 65 | + h6: allowH1s ? "h6" : "h6", |
| 66 | + Fields: Fields, |
| 67 | + // add back links in h1-h6 |
| 68 | + // add back fancier block quotes |
| 69 | + // add a container that removes all spacing for all sub children |
| 70 | + // h1: allowH1s ? (MDXH1 as any) : (MDXH2 as any), |
| 71 | + // h2: allowH1s ? (MDXH2 as any) : (MDXH3 as any), |
| 72 | + // h3: allowH1s ? (MDXH3 as any) : (MDXH4 as any), |
| 73 | + // h4: allowH1s ? (MDXH4 as any) : (MDXH5 as any), |
| 74 | + // h5: allowH1s ? (MDXH5 as any) : (MDXH6 as any), |
| 75 | + // h6: allowH1s ? (MDXH6 as any) : (MDXH6 as any), |
| 76 | + // a: MDXA as any, |
53 | 77 | blockquote: MDXBlockquote as any,
|
54 |
| - em: MDXEm as any, |
55 |
| - strong: MDXStrong as any, |
56 |
| - pre: MDXPre as any, |
57 |
| - ul: MDXUl as any, |
58 |
| - ol: MDXOl as any, |
59 |
| - li: MDXLi as any, |
60 |
| - code: MDXCode as any, |
61 |
| - p: MDXP as any, |
62 |
| - table: MDXTable as any, |
63 |
| - thead: MDXTHead as any, |
64 |
| - tbody: MDXTBody as any, |
65 |
| - tr: MDXTr as any, |
66 |
| - th: MDXTh as any, |
67 |
| - td: MDXTd as any, |
68 |
| - hr: MDXDivider as any, |
69 | 78 | Divider: MDXDivider as any,
|
70 | 79 | Row: MDXRow as any,
|
71 | 80 | Columns: MDXColumns as any,
|
|
0 commit comments