mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 23:57:22 +02:00
docs: wrap more JSX in mdx-code-block (#7568)
This commit is contained in:
parent
6d481f6a29
commit
c03def7d5f
7 changed files with 58 additions and 1 deletions
|
@ -23,7 +23,9 @@ function HelloCodeTitle(props) {
|
|||
```
|
||||
````
|
||||
|
||||
```mdx-code-block
|
||||
<BrowserWindow>
|
||||
```
|
||||
|
||||
```jsx title="/src/components/HelloCodeTitle.js"
|
||||
function HelloCodeTitle(props) {
|
||||
|
@ -31,7 +33,9 @@ function HelloCodeTitle(props) {
|
|||
}
|
||||
```
|
||||
|
||||
```mdx-code-block
|
||||
</BrowserWindow>
|
||||
```
|
||||
|
||||
## Syntax highlighting {#syntax-highlighting}
|
||||
|
||||
|
@ -809,6 +813,7 @@ export default function MyReactPage() {
|
|||
}
|
||||
```
|
||||
|
||||
```mdx-code-block
|
||||
<BrowserWindow>
|
||||
<CodeBlock
|
||||
language="jsx"
|
||||
|
@ -819,6 +824,7 @@ export default function MyReactPage() {
|
|||
}`}
|
||||
</CodeBlock>
|
||||
</BrowserWindow>
|
||||
```
|
||||
|
||||
The props accepted are `language`, `title` and `showLineNumbers`, in the same way as you write Markdown code blocks.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue