You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/mdx/dev/content/section.mdx
+25-2Lines changed: 25 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,8 @@ Lorem ipsum dolor sit amet.
4
4
5
5
<CH.Section>
6
6
7
-
Consectetur adipiscing elit, sed do eiusmod tempor [incididunt](focus://4:7) ut labore et dolore magna aliqua. Praesent elementum facilisis leo vel fringilla est ullamcorper eget.
8
-
_`orem`_, _`sum`_
7
+
Consectetur adipiscing elit, sed do eiusmod tempor [incididunt](focus://4:7) ut labore et dolore magna aliqua. Praesent elementum facilisis leo vel fringilla est ullamcorper eget._`rem(ipsum, dol`_ xxx
8
+
_`orem`_, xxx _`sum`_
9
9
10
10
```js
11
11
functionlorem(ipsum, dolor) {
@@ -49,3 +49,26 @@ function lorem(ipsum, dolor) {
49
49
_`ackground-color: va`_
50
50
51
51
</CH.Section>
52
+
53
+
## Issue #117
54
+
55
+
<CH.Section>
56
+
57
+
{/* prettier-ignore */}
58
+
```js
59
+
constPostLayout= ({ post }) => {
60
+
constMDXContent=useMDXComponent(
61
+
post.body.code
62
+
)
63
+
return (
64
+
<article style={{ width:600 }}>
65
+
<h1>{post.title}</h1>
66
+
<MDXContent />
67
+
</article>
68
+
)
69
+
}
70
+
```
71
+
72
+
It transforms the _`post.body.code`_ into a React component.
0 commit comments