/** * Nextra compatibility shim for `nextra/components`. * Provides minimal component stubs so existing pages/ components * can resolve their imports during the migration to Fumadocs. * * Nextra's components use compound patterns (e.g., Cards.Card, Tabs.Tab, * FileTree.File) which are replicated here using Object.assign. */ import type { ReactNode } from 'react' interface ChildrenProps { children?: ReactNode [key: string]: any } export function Steps({ children }: ChildrenProps) { return
{children}
} function TabComponent({ children }: ChildrenProps) { return
{children}
} function TabsBase({ children }: ChildrenProps) { return
{children}
} export const Tabs = Object.assign(TabsBase, { Tab: TabComponent }) function CardComponent({ children, title, href, icon, ...props }: ChildrenProps & { title?: string; href?: string; icon?: ReactNode }) { const content = (
{icon && {icon}} {title &&

{title}

} {children}
) if (href) return ( {content} ) return content } function CardsBase({ children }: ChildrenProps) { return
{children}
} export const Cards = Object.assign(CardsBase, { Card: CardComponent }) function FileComponent({ children, name, ...props }: ChildrenProps & { name?: string; active?: boolean }) { return (
{name && {name}} {children}
) } function FolderComponent({ children, name, ...props }: ChildrenProps & { name?: string; defaultOpen?: boolean }) { return (
{name && {name}/} {children}
) } function FileTreeBase({ children }: ChildrenProps) { return
{children}
} export const FileTree = Object.assign(FileTreeBase, { File: FileComponent, Folder: FolderComponent, }) export function Button({ children, ...props }: ChildrenProps) { return }