2025-07-27 10:05:37 -07:00
|
|
|
import { DocsLayout } from "fumadocs-ui/layouts/docs";
|
|
|
|
|
import type { ReactNode } from "react";
|
|
|
|
|
import { baseOptions } from "@/app/layout.config";
|
|
|
|
|
import { source } from "@/lib/source";
|
2026-02-27 02:38:52 +05:30
|
|
|
import { SidebarSeparator } from "./sidebar-separator";
|
2025-07-27 10:05:37 -07:00
|
|
|
|
2026-02-27 02:36:18 +05:30
|
|
|
const gridTemplate = `"sidebar header toc"
|
|
|
|
|
"sidebar toc-popover toc"
|
|
|
|
|
"sidebar main toc" 1fr / var(--fd-sidebar-col) minmax(0, 1fr) min-content`;
|
|
|
|
|
|
2025-04-22 02:24:13 -07:00
|
|
|
export default function Layout({ children }: { children: ReactNode }) {
|
2025-07-27 10:05:37 -07:00
|
|
|
return (
|
2026-02-27 02:36:18 +05:30
|
|
|
<DocsLayout
|
|
|
|
|
tree={source.pageTree}
|
|
|
|
|
{...baseOptions}
|
|
|
|
|
containerProps={{ style: { gridTemplate }, className: "bg-fd-card" }}
|
2026-02-27 02:38:52 +05:30
|
|
|
sidebar={{
|
|
|
|
|
components: {
|
|
|
|
|
Separator: SidebarSeparator,
|
|
|
|
|
},
|
|
|
|
|
}}
|
2026-02-27 02:36:18 +05:30
|
|
|
>
|
2025-07-27 10:05:37 -07:00
|
|
|
{children}
|
|
|
|
|
</DocsLayout>
|
|
|
|
|
);
|
|
|
|
|
}
|