From e4fd36ef9ce192e4b7141fdeef50b5cc13c46b73 Mon Sep 17 00:00:00 2001 From: gabrieljablonski Date: Sun, 26 Feb 2023 22:35:56 -0300 Subject: [PATCH 1/3] docs: warning about CSS file being required --- README.md | 2 ++ docs/docs/getting-started.mdx | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/README.md b/README.md index 4eb7afed..00bf22ab 100755 --- a/README.md +++ b/README.md @@ -53,6 +53,8 @@ In versions >=5.8.0, we've introduced the `data-tooltip-id` attribute, and the ` 1 . Import the CSS file to set default styling. +> :warning: You must import the CSS file or the tooltip won't show! + ```js import 'react-tooltip/dist/react-tooltip.css' ``` diff --git a/docs/docs/getting-started.mdx b/docs/docs/getting-started.mdx index e769c234..7b639463 100644 --- a/docs/docs/getting-started.mdx +++ b/docs/docs/getting-started.mdx @@ -58,6 +58,12 @@ For more info and more complex use cases using `anchorSelect`, check [the exampl ### Set the default styling +:::caution + +You must import the CSS file or the tooltip won't show! + +::: + ```js import 'react-tooltip/dist/react-tooltip.css' ``` From 29370d44a9777b0bf74cf7434fc146a268022372 Mon Sep 17 00:00:00 2001 From: gabrieljablonski Date: Sun, 26 Feb 2023 22:37:54 -0300 Subject: [PATCH 2/3] docs: section on `ReactTooltip.rebuild()` --- docs/docs/upgrade-guide/changelog-v4-v5.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/docs/upgrade-guide/changelog-v4-v5.md b/docs/docs/upgrade-guide/changelog-v4-v5.md index ada77606..18656899 100644 --- a/docs/docs/upgrade-guide/changelog-v4-v5.md +++ b/docs/docs/upgrade-guide/changelog-v4-v5.md @@ -32,6 +32,15 @@ This resulted in a great improvement in performance, and made it easier for the - `getContent` prop was removed. Instead, you can directly pass dynamic content to the `content` tooltip prop, or to `data-tooltip-content` in the anchor element - Default behavior of tooltip now is equivalent to V4's `solid` effect, instead of `float`. The new `float` prop can be set to achieve V4's `effect="float"`. See [Options](../options.mdx) for more details +## What about `ReactTooltip.rebuild()`? + +A common question V4 users have when upgrading to V5 is about `ReactTooltip.rebuild()`. +Rebuilding the tooltip was a required step when using V4 with dynamic content. It isn't necessary when using V5. + +The tooltip component now automatically watches for any changes made to the DOM and updates accordingly, without any extra steps needed. + +If you run into any problems with the tooltip not updating after changes are made in other components, please open a [GitHub issue](https://github.com/ReactTooltip/react-tooltip/issues/new/choose) reporting what you find, ideally with a sample [CodeSandbox](https://codesandbox.io/) (or something similar) to help us pinpoint the problem. + ## New Props - [x] `classNameArrow` From c482f9de450dce0c903a0d0ae73aadaeb5a516e6 Mon Sep 17 00:00:00 2001 From: gabrieljablonski Date: Sun, 26 Feb 2023 22:43:04 -0300 Subject: [PATCH 3/3] docs: fix anchor select subtitle --- docs/docs/examples/anchor-select.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/examples/anchor-select.mdx b/docs/docs/examples/anchor-select.mdx index 67ec3c50..de4be7a9 100644 --- a/docs/docs/examples/anchor-select.mdx +++ b/docs/docs/examples/anchor-select.mdx @@ -4,7 +4,7 @@ sidebar_position: 1 # Anchor select -Default color stylings available for the ReactTooltip component. +Using the ReactTooltip anchor select prop. import { Tooltip } from 'react-tooltip' import 'react-tooltip/dist/react-tooltip.css'