Skip to content

Commit 6cdc867

Browse files
committed
docs: fixes param naming for getDynamicPathClass example (#331)
1 parent 2f72121 commit 6cdc867

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,9 @@ Each link calls `pathClassFunc` with its own `TreeLinkDatum` and the tree's curr
197197

198198
```jsx
199199
function StyledLinksTree() {
200-
const getDynamicPathClass = ({ sourceNode, targetNode }, orientation) => {
201-
if (!targetNode.children) {
202-
// Node has no children -> this link leads to a leaf node.
200+
const getDynamicPathClass = ({ source, target }, orientation) => {
201+
if (!target.children) {
202+
// Target node has no children -> this link leads to a leaf node.
203203
return 'link__to-leaf';
204204
}
205205

0 commit comments

Comments
 (0)