Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

next
tsx 25 lines 821 Bytes
Raw
1 import { DocsLayout } from 'fumadocs-ui/layouts/docs';
2 import type { ReactNode } from 'react';
3 import { buildSidebarNavIndex } from './sidebar-nav-index';
4 import { SidebarAnalytics } from '@/components/sidebar-analytics';
5
6 type Source = typeof import('./source').examplesSource;
7
8 export function createDocsLayout(source: Source) {
9 const navIndex = buildSidebarNavIndex(source.pageTree);
10
11 return function Layout({ children }: { children: ReactNode }) {
12 return (
13 <DocsLayout
14 tree={source.pageTree}
15 nav={{ enabled: true, title: null }}
16 searchToggle={{ enabled: false }}
17 sidebar={{ collapsible: false, footer: null, tabs: false }}
18 themeSwitch={{ enabled: false }}
19 >
20 <SidebarAnalytics index={navIndex} />
21 {children}
22 </DocsLayout>
23 );
24 };
25 }