summaryrefslogtreecommitdiffstats
path: root/docusaurus/docs/mdx.md
diff options
context:
space:
mode:
Diffstat (limited to 'docusaurus/docs/mdx.md')
-rw-r--r--docusaurus/docs/mdx.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/docusaurus/docs/mdx.md b/docusaurus/docs/mdx.md
new file mode 100644
index 0000000..f0210fb
--- /dev/null
+++ b/docusaurus/docs/mdx.md
@@ -0,0 +1,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_!