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

Diagram Definition as Child Content #14

Open
MikaBerglund opened this issue Aug 13, 2024 · 0 comments
Open

Diagram Definition as Child Content #14

MikaBerglund opened this issue Aug 13, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@MikaBerglund
Copy link
Contributor

In some cases you may prefer to have the Mermaid diagram definition contained as child content of the MermaidDiagram component instead of specifying it as a parameter.

So, instead of this.

@code {
    string mmDef = "graph TD...";
}

<MermaidDiagram Definition="@mmDef" />

You could write your markup like this.

@code {
    string mmDef = "graph TD...";
}

<MermaidDiagram>
    @mmDef
</MermaidDiagram>

or even using a static inline diagram definition, like below.

<MermaidDiagram>
---
title: Blazorade Mermaid
---
flowchart TB

s1[Click here to read more on the Blazorade-Mermaid Wiki]

click s1 "https://github.com/Blazorade/Blazorade-Mermaid/wiki" "Open Blazorade-Mermaid Wiki"
</MermaidDiagram>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant