mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-29 10:17:55 +02:00
docs: Add docs for Mermaid Component (#9816)
* add docs * fix: missplace * Update markdown-features-diagrams.mdx * yarn format * fix: correct language * fix: typo
This commit is contained in:
parent
c1ac06768b
commit
9e5679ff1a
2 changed files with 32 additions and 0 deletions
|
@ -83,3 +83,19 @@ export default {
|
|||
```
|
||||
|
||||
See the [Mermaid config documentation](https://mermaid-js.github.io/mermaid/#/./Setup?id=configuration) and the [Mermaid config types](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts) for the available config options.
|
||||
|
||||
## Dynamic Mermaid Component {#component}
|
||||
|
||||
To generate dynamic diagrams, you can use the `Mermaid` component:
|
||||
|
||||
```mdx title="Example of dynamic Mermaid component"
|
||||
import Mermaid from '@theme/Mermaid';
|
||||
|
||||
<Mermaid
|
||||
value={`graph TD;
|
||||
A-->B;
|
||||
A-->C;
|
||||
B-->D;
|
||||
C-->D;`}
|
||||
/>
|
||||
```
|
||||
|
|
|
@ -83,3 +83,19 @@ export default {
|
|||
```
|
||||
|
||||
See the [Mermaid config documentation](https://mermaid-js.github.io/mermaid/#/./Setup?id=configuration) and the [Mermaid config types](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/config.type.ts) for the available config options.
|
||||
|
||||
## Dynamic Mermaid Component {#component}
|
||||
|
||||
To generate dynamic diagrams, you can use the `Mermaid` component:
|
||||
|
||||
```mdx title="Example of dynamic Mermaid component"
|
||||
import Mermaid from '@theme/Mermaid';
|
||||
|
||||
<Mermaid
|
||||
value={`graph TD;
|
||||
A-->B;
|
||||
A-->C;
|
||||
B-->D;
|
||||
C-->D;`}
|
||||
/>
|
||||
```
|
||||
|
|
Loading…
Add table
Reference in a new issue