react-sequence-diagram
v0.0.12
Published
React component based on [js-sequence-diagrams](https://github.com/bramp/js-sequence-diagrams)
Downloads
1,697
Maintainers
Readme
react-sequence-diagram
React component based on js-sequence-diagrams
Install
npm install react-sequence-diagram
or
yarn add react-sequence-diagram
Example
import React from 'react';
import { render } from 'react-dom';
import SequenceDiagram from 'react-sequence-diagram';
const input =
'Andrew->China: Says Hello\n' +
'Note right of China: China thinks\\nabout it\n' +
'China-->Andrew: How are you?\n' +
'Andrew->>China: I am good thanks!';
const options = {
theme: 'simple'
};
function onError(error) {
console.log(error);
}
render(<SequenceDiagram input={input} options={options} onError={onError} />, document.getElementById('root'));
More details at js-sequence-diagrams