Skip to content

Commit 942b2d4

Browse files
committed
feat: zoomable images
1 parent c4f5455 commit 942b2d4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/mdx-components.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
import defaultMdxComponents from 'fumadocs-ui/mdx';
2-
import type { MDXComponents } from 'mdx/types';
1+
import { ImageZoom } from "fumadocs-ui/components/image-zoom";
2+
import defaultMdxComponents from "fumadocs-ui/mdx";
3+
import type { MDXComponents } from "mdx/types";
34

45
export function getMDXComponents(components?: MDXComponents): MDXComponents {
56
return {
67
...defaultMdxComponents,
8+
img: (props) => <ImageZoom {...(props as any)} />,
79
...components,
810
};
911
}

0 commit comments

Comments
 (0)