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
-`V4` - CSS styles are built-in and injected by tooltip into the header (not a good practice but convenient), [issues in GitHub](https://github.com/ReactTooltip/react-tooltip/issues?q=is%3Aissue+header)
49
49
-`V5` - CSS styles are optional and can be imported or not to the project
Copy file name to clipboardExpand all lines: docs/docs/upgrade-guide/changelog-v4-v5.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -26,24 +26,24 @@ V4 was a great react tooltip component but was built a few years ago, he was bui
26
26
- Exported module now is `Tooltip` instead of `ReactTooltip`
27
27
-- If you already have a `Tooltip` component in your application and want to explicitly declare this is `ReactTooltip`, just `import { Tooltip as ReactTooltip } from "react-tooltip"`
28
28
- CSS import is now optional, so, you can modify and/or add any styling to your floating tooltip element
29
-
-`data-tip` attribute now is `data-content`
29
+
-`data-tip` attribute now is `data-tooltip-content`
30
30
-`getContent` prop was removed. Instead, you can directly pass dynamic content to the `content` tooltip prop, or to `data-tooltip-content`
31
31
- default behavior of tooltip now is `solid` instead of `float`
32
32
33
33
## New Props
34
34
35
35
-[x] classNameArrow
36
-
-[x] events - `data-events` -`['hover', 'click']` - default: `['hover']` (always an array when using as prop, even with only one option, when using as data attribute: `data-events="hover click"`)
36
+
-[x] events - `data-tooltip-events` -`['hover', 'click']` - default: `['hover']` (always an array when using as prop, even with only one option, when using as data attribute: `data-tooltip-events="hover click"`)
37
37
-[x] isOpen - `boolean` (to control tooltip state) - if not used, internal state of tooltip will handle the show state
38
38
-[x] setIsOpen - `function` (to control tooltip state) - if not used, internal state of tooltip will handle the show state
39
39
40
40
## `V4` props available in `V5`
41
41
42
42
-[x] children
43
-
-[x] place - `data-place`
44
-
-[x] type - **Deprecated** | in V5 -> `variant` - `data-variant`
43
+
-[x] place - `data-tooltip-place`
44
+
-[x] type - **Deprecated** | in V5 -> `variant` - `data-tooltip-variant`
45
45
-[ ] effect - not implemented yet, if many users need this feature, we will work on this one.
46
-
-[x] offset - `data-offset`
46
+
-[x] offset - `data-tooltip-offset`
47
47
-[ ] padding - **Deprecated** | in V5 -> can be easy updated by className prop
48
48
-[ ] multiline - **Deprecated** | in V5 -> this is already supported as default by `content` and `html` props
49
49
-[ ] border - **Deprecated** | in V5 -> can be easy updated by `className` prop
@@ -58,9 +58,9 @@ V4 was a great react tooltip component but was built a few years ago, he was bui
58
58
-[x] className
59
59
-[x] id
60
60
-[x] html
61
-
-[x] delayHide - `data-delay-hide`
61
+
-[x] delayHide - `data-tooltip-delay-hide`
62
62
-[ ] delayUpdate - **Deprecated** | if requested, can be implemented later
63
-
-[x] delayShow - `data-delay-show`
63
+
-[x] delayShow - `data-tooltip-delay-show`
64
64
-[ ] event - not implemented yet, if many users need this feature, we will work on this one.
65
65
-[ ] eventOff - **Deprecated**
66
66
-[ ] isCapture - **Deprecated**
@@ -72,7 +72,7 @@ V4 was a great react tooltip component but was built a few years ago, he was bui
72
72
-[ ] disable - **Deprecated** | in V5 -> state can be controlled or uncontrolled
73
73
-[ ] scrollHide - not implemented yet, if many users need this feature, we will validate if we wrok on this one.
74
74
-[ ] resizeHide - not implemented yet, if many users need this feature, we will validate if we wrok on this one.
75
-
-[x] wrapper - `data-wrapper`
75
+
-[x] wrapper - `data-tooltip-wrapper`
76
76
-[ ] bodyMode - **Deprecated**
77
77
-[ ] clickable - **Deprecated** | Supported by default in V5
78
78
-[ ] disableInternalStyle - **Deprecated** | in V5 -> CSS will be a separate file and can be imported or not
0 commit comments