Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
cleanup: organize mdx-components imports and exports
Group all imports at top, export Accordion and Accordions cleanly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sushmithamallesh committed
Feb 11, 2026 at 20:41 UTC
74746221078bc8386895faa4a8da0b437f04b5e1
1 file changed
+14
-11
docs/mdx-components.tsx
+14
-11
@@ -1,18 +1,14 @@
1
import defaultMdxComponents from 'fumadocs-ui/mdx';
2
import type { MDXComponents } from 'mdx/types';
3
-import { Heading } from '@/components/heading';
4
-import { YouTube } from '@/components/youtube';
5
-import { Tabs, Tab, TabsList, TabsTrigger, TabsContent } from 'fumadocs-ui/components/tabs';
6
-import { Accordion as BaseAccordion, Accordions as BaseAccordions } from 'fumadocs-ui/components/accordion';
7
-export { BaseAccordions as Accordions };
3
import type { ComponentProps } from 'react';
9
-function slugify(text: string): string {
10
- return text.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/(^-|-$)/g, '');
11
-}
4
+import { Accordion as BaseAccordion, Accordions } from 'fumadocs-ui/components/accordion';
5
+import { Tabs, Tab, TabsList, TabsTrigger, TabsContent } from 'fumadocs-ui/components/tabs';
6
import { Callout } from 'fumadocs-ui/components/callout';
7
import { Step, Steps } from 'fumadocs-ui/components/steps';
8
import { Card, Cards } from 'fumadocs-ui/components/card';
9
import { ImageZoom } from 'fumadocs-ui/components/image-zoom';
10
+import { Heading } from '@/components/heading';
11
+import { YouTube } from '@/components/youtube';
12
import { ProviderCard, ProviderGrid } from '@/components/provider-card';
13
import { FrameworkSelector, QuickstartFlow, FrameworkOption } from '@/components/quickstart';
14
import { IntegrationTabs, IntegrationContent } from '@/components/quickstart/integration-tabs';
@@ -23,8 +19,9 @@ import { Video } from '@/components/video';
19
import { CapabilityCard, CapabilityList } from '@/components/capability-card';
20
import { ToolkitsLanding } from '@/components/toolkits/toolkits-landing';
21
import { Mermaid } from '@/components/mermaid';
26
-import { ShieldCheck, Route as RouteIcon } from 'lucide-react';
22
import {
23
+ ShieldCheck,
24
+ Route as RouteIcon,
25
Key,
26
Wrench,
27
Database,
@@ -39,10 +36,16 @@ import {
36
BookOpen,
37
} from 'lucide-react';
38
39
+function slugify(text: string): string {
40
+ return text.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/(^-|-$)/g, '');
41
+}
42
+
43
export function Accordion({ id, title, ...props }: ComponentProps<typeof BaseAccordion>) {
44
return <BaseAccordion id={id ?? (typeof title === 'string' ? slugify(title) : undefined)} title={title} {...props} />;
45
}
46
47
+export { Accordions };
48
+
49
export function getMDXComponents(components?: MDXComponents): MDXComponents {
50
return {
51
...defaultMdxComponents,
@@ -57,7 +60,7 @@ export function getMDXComponents(components?: MDXComponents): MDXComponents {
60
TabsTrigger,
61
TabsContent,
62
Accordion,
60
- Accordions: BaseAccordions,
63
+ Accordions,
64
Callout,
65
Step,
66
Steps,
@@ -79,7 +82,7 @@ export function getMDXComponents(components?: MDXComponents): MDXComponents {
82
ToolkitsLanding,
83
Mermaid,
84
StepTitle,
82
- // Lucide icons - available globally in MDX without imports
85
+ // Lucide icons
86
ShieldCheck,
87
RouteIcon,
88
Key,