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
import PetSchema from './petstore/schemas/pet.schema.mdx';
10
+
import BrowserWindow from '@site/src/components/BrowserWindow';
11
+
```
12
+
13
+
## Importing MDX
14
+
15
+
:::tip
16
+
For more background see the [official documentation](https://docusaurus.io/docs/markdown-features/react#importing-markdown) for importing MDX on docusaurus.io
17
+
:::
18
+
19
+
Let's say you're working on supporting documentation for your API and you want to reference a particular schema. With Docusaurus, you can import generated `*.schema.mdx` files and use them as components!
The `BrowserWindow` component implemented by [docusaurus.io](https://github.com/facebook/docusaurus/tree/main/website/src/components/BrowserWindow) was adapted for this example. Aside from visually framing a schema it also supports passing custom styles to the schema component itself.
39
+
:::
40
+
41
+
```mdx title="Schema wrapped in BrowserWindow component"
0 commit comments