From 683b3d66abf1a96b50281dbea81bc5ca931360c2 Mon Sep 17 00:00:00 2001 From: ssdfasd <2156608475@qq.com> Date: Wed, 18 Mar 2026 18:54:44 +0800 Subject: [PATCH] style: simplify doc content styling with minimal design --- src/components/DocContent.tsx | 83 ++++++++++++++++++++++++++++------- 1 file changed, 68 insertions(+), 15 deletions(-) diff --git a/src/components/DocContent.tsx b/src/components/DocContent.tsx index beae4e2..149abd3 100644 --- a/src/components/DocContent.tsx +++ b/src/components/DocContent.tsx @@ -10,8 +10,8 @@ interface DocContentProps { export const DocContent = ({ content, onReferenceClick }: DocContentProps) => { if (!content) { return ( -
-

Select a document from the sidebar

+
+

选择左侧文档

) } @@ -22,14 +22,14 @@ export const DocContent = ({ content, onReferenceClick }: DocContentProps) => { return ( ) } return ( - + {children} ) @@ -44,55 +44,108 @@ export const DocContent = ({ content, onReferenceClick }: DocContentProps) => { ) } return ( - + {children} ) }, pre: ({ children }) => ( -
+      
         {children}
       
), table: ({ children }) => ( -
- +
+
{children}
), thead: ({ children }) => ( - + {children} ), th: ({ children }) => ( - + {children} ), td: ({ children }) => ( - + {children} ), tr: ({ children }) => ( - + {children} ), + h1: ({ children }) => ( +

+ {children} +

+ ), + h2: ({ children }) => ( +

+ {children} +

+ ), + h3: ({ children }) => ( +

+ {children} +

+ ), + h4: ({ children }) => ( +

+ {children} +

+ ), + p: ({ children }) => ( +

+ {children} +

+ ), + ul: ({ children }) => ( +
    + {children} +
+ ), + ol: ({ children }) => ( +
    + {children} +
+ ), + li: ({ children }) => ( +
  • + {children} +
  • + ), + blockquote: ({ children }) => ( +
    + {children} +
    + ), + hr: () => ( +
    + ), + strong: ({ children }) => ( + + {children} + + ), } return ( -
    -
    +
    +
    {content} -
    +
    ) }