Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vv13/mermaid-react
display mermaid diagrams in modern React component.
https://github.com/vv13/mermaid-react
Last synced: 3 months ago
JSON representation
display mermaid diagrams in modern React component.
- Host: GitHub
- URL: https://github.com/vv13/mermaid-react
- Owner: vv13
- Created: 2020-10-26T03:10:44.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-26T03:14:41.000Z (about 4 years ago)
- Last Synced: 2024-08-28T16:56:06.018Z (4 months ago)
- Language: TypeScript
- Size: 386 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mermaid-react
> Made with create-react-library
[![NPM](https://img.shields.io/npm/v/mermaid-react.svg)](https://www.npmjs.com/package/mermaid-react) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
## Install
```bash
npm install --save mermaid-react
```## Usage
```tsx
import React from 'react'
import MermaidReact from 'mermaid-react'const t = `
pie title Pets adopted by volunteers
"Dogs" : 386
"Cats" : 85
"Rats" : 15
`const App = () => {
return console.log('test Click')} onRender={svg => console.log('render content', svg)} />
}export default App
```
## License
MIT © [vv13](https://github.com/vv13)