Skip to content

Commit cf0eed4

Browse files
committed
docs(readme): adds custom node examples
1 parent 56ad31f commit cf0eed4

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,9 @@ The [`renderCustomNodeElement` prop](https://bkrem.github.io/react-d3-tree/docs/
215215

216216
Cases where you may find rendering your own `Node` element useful include:
217217

218-
<!-- TODO: attach examples for each use case -->
219-
220-
- Using a **different SVG tag for your nodes** (instead of the default `<circle>`).
221-
- Gaining **fine-grained control over event handling** (e.g. to implement events not covered by the default API).
222-
- Building **richer & more complex nodes/labels** by leveraging the `foreignObject` tag to render HTML inside the SVG namespace.
218+
- Using a **different SVG tag for your nodes** (instead of the default `<circle>`) - [Example (codesandbox.io)](https://codesandbox.io/s/rd3t-v2-custom-svg-tag-1bq1e?file=/src/App.js)
219+
- Gaining **fine-grained control over event handling** (e.g. to implement events not covered by the default API) - [Example (codesandbox.io)](https://codesandbox.io/s/rd3t-v2-custom-event-handlers-5pwxw?file=/src/App.js)
220+
- Building **richer & more complex nodes/labels** by leveraging the `foreignObject` tag to render HTML inside the SVG namespace - [Example (codesandbox.io)](https://codesandbox.io/s/rd3t-v2-custom-with-foreignobject-0mfj8?file=/src/App.js)
223221

224222
### `pathFunc`
225223
TODO

0 commit comments

Comments
 (0)