Skip to content

Commit

Permalink
docs: update usage
Browse files Browse the repository at this point in the history
  • Loading branch information
bubkoo committed Dec 25, 2019
1 parent 527e501 commit 41f7964
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/x6-react-shape/README.md
Expand Up @@ -15,13 +15,11 @@ $ yarn add @antv/x6-react-shape
## Usage

```
import { register } from '@antv/x6-react-shape'
import { Graph, Shape } from '@antv/x6'
import { ReactShape } from '@antv/x6-react-shape'
register(); // register shape with default name "shape"
// or
register('react-shape'); // register shape with specified name "react-shape"
// register shape with name "react"
Shape.register('react', ReactShape, true)
// render
graph.addNode({
Expand Down

0 comments on commit 41f7964

Please sign in to comment.