mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-28 07:09:50 +00:00
23 lines
670 B
TypeScript
23 lines
670 B
TypeScript
import * as Accordions from 'fumadocs-ui/components/accordion';
|
|
import * as Tabs from 'fumadocs-ui/components/tabs';
|
|
import defaultMdxComponents from 'fumadocs-ui/mdx';
|
|
import * as Icons from 'lucide-react';
|
|
import type { MDXComponents } from 'mdx/types';
|
|
import { FC } from 'react';
|
|
|
|
export function getMDXComponents(components?: MDXComponents) {
|
|
return {
|
|
...defaultMdxComponents,
|
|
...(Icons as unknown as Record<keyof typeof Icons, FC>),
|
|
...Accordions,
|
|
...Tabs,
|
|
...components,
|
|
} satisfies MDXComponents;
|
|
}
|
|
|
|
export const useMDXComponents = getMDXComponents;
|
|
|
|
declare global {
|
|
type MDXProvidedComponents = ReturnType<typeof getMDXComponents>;
|
|
}
|