We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
getDynamicPathClass
1 parent 2f72121 commit 6cdc867Copy full SHA for 6cdc867
README.md
@@ -197,9 +197,9 @@ Each link calls `pathClassFunc` with its own `TreeLinkDatum` and the tree's curr
197
198
```jsx
199
function StyledLinksTree() {
200
- const getDynamicPathClass = ({ sourceNode, targetNode }, orientation) => {
201
- if (!targetNode.children) {
202
- // Node has no children -> this link leads to a leaf node.
+ const getDynamicPathClass = ({ source, target }, orientation) => {
+ if (!target.children) {
+ // Target node has no children -> this link leads to a leaf node.
203
return 'link__to-leaf';
204
}
205
0 commit comments