Skip to content

Commit 1f1c8a2

Browse files
committed
Add type to CH components
1 parent 19be35e commit 1f1c8a2

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

packages/mdx/src/components.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
} from "./mdx-client/annotations"
1515
import { Preview } from "./mdx-client/preview"
1616
import { InlineCode } from "./mdx-client/inline-code"
17+
import type { MDXComponents } from "mdx/types"
1718

1819
export {
1920
Code,
@@ -31,7 +32,7 @@ export {
3132
PreviewSlot,
3233
}
3334

34-
export const CH = {
35+
export const CH: MDXComponents = {
3536
Code,
3637
Section,
3738
SectionLink,

packages/mdx/src/mdx-client/annotations.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ import { CodeAnnotation } from "../smooth-code"
33
import { getColor, transparent, ColorName } from "../utils"
44

55
export function Annotation() {
6-
return "error: code hike remark plugin not running or annotation isn't at the right place"
6+
return (
7+
<div>
8+
"error: code hike remark plugin not running or
9+
annotation isn't at the right place"
10+
</div>
11+
)
712
}
813

914
export const annotationsMap: Record<

0 commit comments

Comments
 (0)