From 74b7ed291b9f5518f2a7b7003434b72043e9ddf8 Mon Sep 17 00:00:00 2001 From: p-sw Date: Sun, 2 Jun 2024 06:59:19 +0900 Subject: [PATCH] feat: use DynamicLayout & import tocs --- packages/react/src/App.tsx | 48 +++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/packages/react/src/App.tsx b/packages/react/src/App.tsx index 34dc728..10d0df7 100644 --- a/packages/react/src/App.tsx +++ b/packages/react/src/App.tsx @@ -9,12 +9,21 @@ import MainLayout from "./MainLayout"; import Home from "./Home"; import DocsLayout from "./DocsLayout"; import ErrorBoundary from "./ErrorHandler"; +import DynamicLayout from "./DynamicLayout"; -import DocsIntroduction from "./docs/docs/introduction.mdx"; -import DocsInstallation from "./docs/docs/installation.mdx"; +import DocsIntroduction, { + tableOfContents as docsIntroductionToc, +} from "./docs/docs/introduction.mdx"; +import DocsInstallation, { + tableOfContents as docsInstallationToc, +} from "./docs/docs/installation.mdx"; -import ComponentsButton from "./docs/components/Button.mdx"; -import ComponentsCheckbox from "./docs/components/Checkbox.mdx"; +import ComponentsButton, { + tableOfContents as componentsButtonToc, +} from "./docs/components/Button.mdx"; +import ComponentsCheckbox, { + tableOfContents as componentsCheckboxToc, +} from "./docs/components/Checkbox.mdx"; const overrideComponents = { pre: (props: any) =>
,
@@ -36,17 +45,40 @@ const router = createBrowserRouter(
     } errorElement={}>
       } />
       }>
-        } />
-        } />
+        
+              
+            
+          }
+        />
+        
+              
+            
+          }
+        />
         
            redirect("/docs/components/button")} />
           }
+            element={
+              
+                
+              
+            }
           />
           }
+            element={
+              
+                
+              
+            }
+          />
           />