Skip to content

Commit 49796d0

Browse files
committed
feat(docs/layout): Refactor layout component to use updated DocsLayoutProps and improve theme switching
1 parent 405d901 commit 49796d0

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/app/docs/layout.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
import { DocsLayout } from "fumadocs-ui/layouts/docs";
1+
import { DocsLayout, DocsLayoutProps } from "fumadocs-ui/layouts/notebook";
22
import type { ReactNode } from "react";
33
import { baseOptions } from "@/app/layout.config";
44
import { source } from "@/lib/source";
55

6+
const docsLayoutOptions: DocsLayoutProps = {
7+
tree: source.pageTree,
8+
...baseOptions,
9+
themeSwitch: {
10+
mode: "light-dark",
11+
},
12+
};
13+
614
export default function Layout({ children }: { children: ReactNode }) {
7-
return (
8-
<DocsLayout tree={source.pageTree} {...baseOptions}>
9-
{children}
10-
</DocsLayout>
11-
);
15+
return <DocsLayout {...docsLayoutOptions}>{children}</DocsLayout>;
1216
}

0 commit comments

Comments
 (0)