Skip to content

Commit 156e542

Browse files
committed
fix example
1 parent 77caf4b commit 156e542

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

website/_dogfooding/_pages tests/code-block-tests.mdx

+20-10
Original file line numberDiff line numberDiff line change
@@ -188,18 +188,28 @@ Multi-line text inside `pre` will turn into one-liner, but it's okay (https://gi
188188
<br />
189189
</CodeBlock>
190190

191-
### Code blocks with `ReactNode` in title
192-
193-
<CodeBlock
194-
className="language-yaml"
195-
title={<span className="badge badge--primary">YAML</span>}
196-
>
197-
link:{'\n'}
198-
{' '}title: front page{'\n'}
199-
{' '}path: /docs/{'\n'}
191+
## Code blocks with `ReactNode` in title
192+
193+
<CodeBlock
194+
language="yaml"
195+
title={
196+
<div
197+
style={{
198+
display: 'flex',
199+
justifyContent: 'space-between',
200+
alignItems: 'center',
201+
}}>
202+
<span>
203+
<code>ReactNode</code> title
204+
</span>{' '}
205+
<span className="badge badge--primary">YAML</span>
206+
</div>
207+
}>
208+
{`link:
209+
title: front page
210+
path: /docs/`}
200211
</CodeBlock>
201212

202-
203213
## Code blocks with line numbering tests
204214

205215
```jsx

0 commit comments

Comments
 (0)