From ce0b5877772b129d6a697c98fea13b0f9b2ae85c Mon Sep 17 00:00:00 2001 From: p-sw Date: Sat, 1 Jun 2024 01:56:31 +0900 Subject: [PATCH] feat: add sidenav in RouteObject --- packages/react/src/RouteObject.ts | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/packages/react/src/RouteObject.ts b/packages/react/src/RouteObject.ts index 4f2aa93..a3cea10 100644 --- a/packages/react/src/RouteObject.ts +++ b/packages/react/src/RouteObject.ts @@ -15,5 +15,27 @@ export default { name: "Github", eq: () => false } - ] -} \ No newline at end of file + ], + sideNav: { + "Documents": [ + { + path: "/docs", + name: "Introduction", + eq: (pathname: string) => pathname === "/docs" + }, + { + path: "/docs/installation", + name: "Installation", + eq: (pathname: string) => pathname === "/docs/installation" + } + ], + "Components": [ + { + path: "/docs/components/button", + name: "Button", + eq: (pathname: string) => pathname === "/docs/components/button" + } + ] + } +} +