@devries-cameron20 / composio Mirror · read-only / commits / da86e230e
Fork 0

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

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 22, 04:30 UTC

docs: only show quickstart label/link when inside quickstart portal

IntegrationTabs is also used on openai.mdx for "Responses API" / "Chat Completions" tabs. The "Choose your integration type" label and guide link only apply to the quickstart Native Tools vs MCP context. Now only renders the portal version (with label, divider, link) when using the default tabs; custom tabs get plain inline rendering. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Sushmitha Mallesh committed Mar 5, 2026 at 12:35 UTC da86e230e280e312e12883a89eec14bbf60dd95e
1 file changed +43 -29
docs/components/quickstart/integration-tabs.tsx
+43 -29
@@ -24,7 +24,39 @@ interface IntegrationTabsProps {
24 tabs?: TabConfig[];
25 }
26
27 -function IntegrationTabsHeader({ tabs }: { tabs: TabConfig[] }) {
27 +function TabsHeader({ tabs }: { tabs: TabConfig[] }) {
28 + return (
29 + <div className="flex items-center gap-3">
30 + <TabsList>
31 + {tabs.map((tab) => (
32 + <TabsTrigger key={tab.value} value={tab.value} className="gap-2">
33 + {tab.icon && tab.iconDark && (
34 + <div className="flex h-4 w-4 shrink-0 items-center justify-center">
35 + <Image
36 + src={tab.icon}
37 + alt={tab.label}
38 + width={16}
39 + height={16}
40 + className="h-4 w-4 dark:hidden"
41 + />
42 + <Image
43 + src={tab.iconDark}
44 + alt={tab.label}
45 + width={16}
46 + height={16}
47 + className="hidden h-4 w-4 dark:block"
48 + />
49 + </div>
50 + )}
51 + {tab.label}
52 + </TabsTrigger>
53 + ))}
54 + </TabsList>
55 + </div>
56 + );
57 +}
58 +
59 +function PortaledTabsHeader({ tabs }: { tabs: TabConfig[] }) {
60 const [portalTarget, setPortalTarget] = useState<HTMLElement | null>(null);
61
62 useEffect(() => {
@@ -48,33 +80,7 @@ function IntegrationTabsHeader({ tabs }: { tabs: TabConfig[] }) {
80 const header = (
81 <div className="mt-4 border-t border-fd-border pt-4">
82 <p className="mb-3 text-sm font-medium text-fd-muted-foreground">Choose your integration type · <Link href="/docs/native-tools-vs-mcp" className="text-fd-muted-foreground hover:text-fd-foreground transition-colors underline underline-offset-2">Use this guide to decide</Link></p>
51 - <div className="flex items-center gap-3">
52 - <TabsList>
53 - {tabs.map((tab) => (
54 - <TabsTrigger key={tab.value} value={tab.value} className="gap-2">
55 - {tab.icon && tab.iconDark && (
56 - <div className="flex h-4 w-4 shrink-0 items-center justify-center">
57 - <Image
58 - src={tab.icon}
59 - alt={tab.label}
60 - width={16}
61 - height={16}
62 - className="h-4 w-4 dark:hidden"
63 - />
64 - <Image
65 - src={tab.iconDark}
66 - alt={tab.label}
67 - width={16}
68 - height={16}
69 - className="hidden h-4 w-4 dark:block"
70 - />
71 - </div>
72 - )}
73 - {tab.label}
74 - </TabsTrigger>
75 - ))}
76 - </TabsList>
77 - </div>
83 + <TabsHeader tabs={tabs} />
84 </div>
85 );
86
@@ -87,9 +93,17 @@ function IntegrationTabsHeader({ tabs }: { tabs: TabConfig[] }) {
93 }
94
95 export function IntegrationTabs({ children, defaultValue, tabs = defaultTabs }: IntegrationTabsProps) {
96 + const isQuickstart = tabs === defaultTabs;
97 +
98 return (
99 <Tabs defaultValue={defaultValue ?? tabs[0]?.value ?? 'native'} className="not-prose">
92 - <IntegrationTabsHeader tabs={tabs} />
100 + {isQuickstart ? (
101 + <PortaledTabsHeader tabs={tabs} />
102 + ) : (
103 + <div className="mb-5">
104 + <TabsHeader tabs={tabs} />
105 + </div>
106 + )}
107 {children}
108 </Tabs>
109 );