@@ -4,6 +4,7 @@ import { code } from "@streamdown/code";
44import { mermaid } from "@streamdown/mermaid" ;
55import { math } from "@streamdown/math" ;
66import { cjk } from "@streamdown/cjk" ;
7+ import "katex/dist/katex.min.css" ;
78
89interface MarkdownComponentProps {
910 children : string ;
@@ -14,24 +15,43 @@ interface MarkdownComponentProps {
1415const MarkdownComponent = memo ( ( { children, animated } : MarkdownComponentProps ) => {
1516 return < Streamdown
1617 className = "space-y-1 leading-[1.50]"
18+ shikiTheme = { [ "github-light" , "ayu-dark" ] }
1719 components = { {
1820 h1 : ( { children } ) => (
19- < h1 className = "text-lg font-bold mt-2" >
21+ < h1 className = "text-lg font-bold mt-2 !text-default-800 dark:!text-default-800 " >
2022 { children }
2123 </ h1 >
2224 ) ,
2325
2426 h2 : ( { children } ) => (
25- < h2 className = "text-base font-bold mt-2 mb-1" >
27+ < h2 className = "text-base font-bold mt-2 mb-1 !text-default-800 dark:!text-default-800 " >
2628 { children }
2729 </ h2 >
2830 ) ,
2931
3032 h3 : ( { children } ) => (
31- < h3 className = "text-sm font-bold mt-2" >
33+ < h3 className = "text-sm font-bold mt-2 !text-default-800 dark:!text-default-800 " >
3234 { children }
3335 </ h3 >
3436 ) ,
37+
38+ h4 : ( { children } ) => (
39+ < h4 className = "text-xs font-bold mt-2 !text-default-800 dark:!text-default-800" >
40+ { children }
41+ </ h4 >
42+ ) ,
43+
44+ h5 : ( { children } ) => (
45+ < h5 className = "text-xs font-bold mt-2 !text-default-800 dark:!text-default-800" >
46+ { children }
47+ </ h5 >
48+ ) ,
49+
50+ h6 : ( { children } ) => (
51+ < h6 className = "text-xs font-bold mt-2 !text-default-800 dark:!text-default-800" >
52+ { children }
53+ </ h6 >
54+ ) ,
3555 } }
3656 plugins = { { code, mermaid, math, cjk } }
3757 isAnimating = { animated }
0 commit comments