summaryrefslogtreecommitdiffstats
path: root/docusaurus/docs/mdx.md
blob: f0210fb70d7dbad727167b7b1f6f0612894e5fd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
---
id: mdx
title: Powered by MDX
---

You can write JSX and use React components within your Markdown thanks to [MDX](https://mdxjs.com/).

export const Highlight = ({children, color}) => ( <span style={{
      backgroundColor: color,
      borderRadius: '2px',
      color: '#fff',
      padding: '0.2rem',
    }}>{children}</span> );

<Highlight color="#25c2a0">Docusaurus green</Highlight> and <Highlight color="#1877F2">Facebook blue</Highlight> are my favorite colors.

I can write **Markdown** alongside my _JSX_!