SurfSense/surfsense_web/app/docs/layout.tsx

27 lines
722 B
TypeScript
Raw Normal View History

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";
import { SidebarSeparator } from "./sidebar-separator";
2025-07-27 10:05:37 -07:00
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 (
<DocsLayout
tree={source.pageTree}
{...baseOptions}
containerProps={{ style: { gridTemplate }, className: "bg-fd-card" }}
sidebar={{
components: {
Separator: SidebarSeparator,
},
}}
>
2025-07-27 10:05:37 -07:00
{children}
</DocsLayout>
);
}