Skip to content

Commit 050e414

Browse files
committed
feat: add MDX components integration in mdx-components.tsx
Introduced a new file, mdx-components.tsx, to integrate MDX components such as Callout, Steps, and Step. This addition enhances the component usage within the documentation, promoting better organization and reusability of MDX components.
1 parent e8bb8ae commit 050e414

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
import { Callout } from './components/Callout';
2-
import { Steps, Step } from './components/Steps';
1+
import { Callout } from './app/components/Callout';
2+
import { Steps, Step } from './app/components/Steps';
33

44
type MDXComponents = Record<string, any>;
55

66
export function useMDXComponents(components: MDXComponents): MDXComponents {
77
return {
8-
// 自定义组件
98
Callout,
109
Steps,
1110
Step,
12-
// 保留默认组件
1311
...components
1412
};
1513
}
16-

doc/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3-
import "./.next/types/routes.d.ts";
3+
import "./.next/dev/types/routes.d.ts";
44

55
// NOTE: This file should not be edited
66
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

0 commit comments

Comments
 (0)