Licence
SEE LICENSE IN LICENSE
Version
0.1.4
Deps
6
Size
13 kB
Vulns
8
Weekly
0
mermaid2react
npm install mermaid2react
For SSR and backend rendering, it's not necessary to load mermaid js. Additionally, webpack and friends can create issues when importing the library into your package.
Hence, this repo was born, which uses load-script to dynamically load mermaid from a CDN.
Usage
import { Mermaid } from 'mermaid2react';
export const YourComponent = () => {
return (
<Mermaid chart={`
graph TD
A[AuthOneTimeToken] -->|password| B(Verify)
B --> C{matches?}
C -->|yes| D[return token]
C -->|no| E[return false]
`} />
);
}