Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add docs for Mermaid Component #9816

Merged
merged 6 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;`}
/>
```
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Its-Just-Nans marked this conversation as resolved.
Show resolved Hide resolved
## 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