Skip to content

Commit f3caffd

Browse files
authored
update README.md - fix example (#18)
1 parent ef22813 commit f3caffd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ npm install @gravity-ui/graph
1818
- [Customization connection](https://preview.gravity-ui.com/graph/?path=/story/api-updateconnection--default)
1919

2020
```jsx
21-
import { GraphCanvas, GraphState, TRenderBlockFn, useGraph } from "@gravity-ui/graph";
21+
import { GraphCanvas, GraphState, TRenderBlockFn, GraphBlock, useGraph } from "@gravity-ui/graph";
2222
import React from "react";
2323

2424
const config = {};
@@ -62,8 +62,8 @@ export function GraphEditor() {
6262
})
6363
})
6464

65-
const renderBlock = (graph, block) => {
66-
return <HTMLBlockView graph={graph} block={block} />;
65+
const renderBlockFn = (graph, block) => {
66+
return <GraphBlock graph={graph} block={block}>{block.id}</GraphBlock>;
6767
};
6868

6969
return (
@@ -86,4 +86,3 @@ export function GraphEditor() {
8686
- [Pulic API](docs/public_api.md)
8787
- [Graph Events](docs/events.md)
8888
- [Editing](docs/editing.md)
89-

0 commit comments

Comments
 (0)