Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions examples/contentlayer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@
"contentlayer/generated": ["./.contentlayer/generated"]
}
},
"mdx": {
"checkMdx": true
},
"include": [
"next-env.d.ts",
"**/*.mdx",
"**/*.ts",
"**/*.tsx",
".contentlayer/generated"
Expand Down
9 changes: 9 additions & 0 deletions examples/contentlayer/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { CH } from "@code-hike/mdx/components"

declare global {
interface MDXProvidedComponents {
CH: typeof CH
}
}

export {}
3 changes: 1 addition & 2 deletions packages/mdx/src/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
} from "./mdx-client/annotations"
import { Preview } from "./mdx-client/preview"
import { InlineCode } from "./mdx-client/inline-code"
import type { MDXComponents } from "mdx/types"
import {
useStaticToggle,
StaticToggle,
Expand All @@ -38,7 +37,7 @@ export {
StaticToggle,
}

export const CH: MDXComponents = {
export const CH = {
Code,
Section,
SectionLink,
Expand Down