You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit adds new prop `wordClassNames`, which allows to define
custom class name(s) for each word separately. This expands the ability
to customize words presentation at call-site.
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,6 +100,7 @@ for more detailed props, please refer to below:
100
100
| padding | The padding accessor function, which indicates the numerical padding for each word. |`number \| (d) => number`||`1`|
101
101
| random | The internal random number generator, used for selecting the initial position of each word, and the clockwise/counterclockwise direction of the spiral for each word. This should return a number in the range `[0, 1)`. |`(d) => number`||`Math.random`|
102
102
| fill | The fill accessor function, which indicates the color for each word. |`(d, i) => string`||`(d, i) => schemeCategory10ScaleOrdinal(i)`|
103
+
| wordClassNames | The classNames accessor function, which indicates the `class` for each word. |`(d, i) => string`||`() => ''`|
103
104
| onWordClick | The function will be called when `click` event is triggered on a word |`(event, d) => {}`|| null |
104
105
| onWordMouseOver | The function will be called when `mouseover` event is triggered on a word |`(event, d) => {}`|| null |
105
106
| onWordMouseOut | The function will be called when `mouseout` event is triggered on a word |`(event, d) => {}`|| null |
0 commit comments