docs(readme): format

This commit is contained in:
moklick
2019-10-22 17:49:35 +02:00
parent 76ec1d9a7d
commit 429ede3386
2 changed files with 8 additions and 3 deletions
+1
View File
@@ -1 +1,2 @@
example/src example/src
*.md
+6 -2
View File
@@ -10,7 +10,7 @@ npm install github:wbkd/react-flow
# Usage # Usage
This is a very basic example of how to use react-flow. There are more advanced examples in the [example](/example) folder. This is a very basic example of how to use react-flow. There are more advanced examples in the [example](/example/src) folder.
```javascript ```javascript
import React from 'react'; import React from 'react';
@@ -22,7 +22,11 @@ const elements = [
{ id: 'e1-2', source: '1', target: '2', animated: true }, { id: 'e1-2', source: '1', target: '2', animated: true },
]; ];
const BasicGraph = () => <Graph elements={elements} style={{ width: '100%', height: '100%' }} />; const graphStyles = { width: '100%', height: '100%' };
const BasicGraph = () => (
<Graph elements={elements} style={graphStyles} />
);
``` ```
# Props # Props