From 072495758a28a646ac6e2e97e02eaf930d6e1bdf Mon Sep 17 00:00:00 2001 From: moklick Date: Sun, 31 May 2020 11:56:00 +0200 Subject: [PATCH] docs(readme): add custom node props section --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index aeef78e4..3e738aaa 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,17 @@ You could now use the type `special` for a node. The `default`, `input` and `output` types would be still available except you overwrote one of them. There is an example of a custom node implementation in the [custom node example](/example/src/CustomNode). +## Custom Node Props + +Your custom nodes are wrapped so that the basic functions like dragging or selecting work. Custom nodes receive the following props: + +- `id`: string +- `data`: object +- `type`: string +- `selected`: boolean +- `sourcePosition`: string +- `targetPosition`: string + ## Handle Component We export a `Handle` component as a helper for your custom nodes: