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 32 lines 1.06 KB
Raw
1 import { Edit } from 'lucide-react';
2
3 interface EditOnGitHubProps {
4 /**
5 * File path relative to the repository root, e.g. `docs/content/docs/index.mdx`
6 * or `docs/components/toolkits/toolkit-detail.tsx`.
7 */
8 path: string;
9 /** Defaults to the `next` branch. */
10 sha?: string;
11 }
12
13 /**
14 * "Edit this page on GitHub" link, rendered at the bottom of each docs page.
15 * Links to the source file in the public Composio repo on the configured branch.
16 */
17 export function EditOnGitHub({ path, sha = 'next' }: EditOnGitHubProps) {
18 const href = `https://github.com/ComposioHQ/composio/blob/${sha}/${path}`;
19 return (
20 <div className="not-prose mt-12 flex justify-start border-t border-fd-border/60 pt-6">
21 <a
22 href={href}
23 target="_blank"
24 rel="noopener noreferrer"
25 className="inline-flex items-center gap-1.5 text-xs font-medium text-fd-muted-foreground hover:text-fd-foreground transition-colors"
26 >
27 <Edit className="size-3.5" aria-hidden="true" />
28 <span>Edit this page on GitHub</span>
29 </a>
30 </div>
31 );
32 }