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
{{ message }}
This repository was archived by the owner on Mar 16, 2026. It is now read-only.
Copy file name to clipboardExpand all lines: src/docs/documentation/general/writing-mdx.mdx
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,9 +15,11 @@ More details about MDX in the [Official website.](https://mdxjs.com/)
15
15
## Working with components
16
16
17
17
For now, you only need to know that with MDX you can use your components inside markdown.
18
-
But how? Let's take a look at how we can improve our `.mdx` created before by importing and using a component inside it. The example below assumes we have a exported component named `Button` in a file named `Button.jsx`/`Button.tsx` located in the same folder as the `.mdx`-file we are editing.
18
+
But how? Let's take a look at how we can improve our `.mdx`file created previously by importing and using a component inside it.
19
19
20
-
```markdown
20
+
The example below assumes we have an exported component named `Button` in a file named `Button.jsx`/`Button.tsx` located in the same folder as the `.mdx` file we are editing.
21
+
22
+
```mdx
21
23
---
22
24
name: Hello world
23
25
---
@@ -26,17 +28,16 @@ import { Button } from './Button'
26
28
27
29
# Hello world
28
30
29
-
Hello, I'm still a mdx file, but now I have a button component!
31
+
Hello, I'm still a mdx file, but now I have a button component!
With MDX you can mix _React Components_ or _html-elements_ with regular markdown allowing you to either document your own components _or_ create helper components that make documentation easier.
37
41
38
-
With MDX you can mix _React Components_ or _html-elements_ with regular markdown allowing you to either document your own components _or_ creating helper components that makes documentation easier. **Docz** comes with some prebuilt helper components which will help you document components faster, these are covered in [**Built-in components**](/docs/built-in-components).
42
+
**Docz** comes with some helper components that will help you document your components faster, these are covered in [**Built-in components**](/docs/built-in-components).
39
43
40
-
> ### Note
41
-
>
42
-
> So far Docz only works with React components. But stay calm, we are working to bring Preact, Vue and some others libraries to Docz!
0 commit comments