Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/docs/examples/styling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -348,13 +348,15 @@ import { Tooltip } from 'react-tooltip'

### Changing the padding

The default `padding: 8px 16px` is on `.react-tooltip-content-wrapper`. `className` is applied to the tooltip root, so a `padding` rule there is added around the content instead of replacing the default. Set padding on the content wrapper.

#### Removing padding

```jsx
import { Tooltip } from 'react-tooltip'

<style>
.example-container .example-no-padding {
.example-container .example-no-padding .react-tooltip-content-wrapper {
padding: 0;
}
</style>
Expand Down Expand Up @@ -383,7 +385,7 @@ import { Tooltip } from 'react-tooltip'
import { Tooltip } from 'react-tooltip'

<style>
.example-container .example-padding {
.example-container .example-padding .react-tooltip-content-wrapper {
padding: 48px;
}
</style>
Expand Down
7 changes: 7 additions & 0 deletions docs/docs/upgrade-guide/changelog-v5-v6.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ V6 keeps the core tooltip behavior from V5, but updates the implementation and A
- `data-tooltip-html` was removed
- `html` prop was removed
- Raw HTML string examples should now be implemented with `children` or `render`
- Default padding (`8px 16px`) is on `.react-tooltip-content-wrapper`, not the root `.react-tooltip`. This also shipped in 5.30.1. A `padding` rule on `className` is added around the content instead of replacing the default. Set it on the content wrapper:

```css
.my-tooltip .react-tooltip-content-wrapper {
padding: 0;
}
```

## New And Updated Capabilities

Expand Down
4 changes: 2 additions & 2 deletions docs/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@
border-radius: 50%;
}

.example-container .example-no-padding {
.example-container .example-no-padding .react-tooltip-content-wrapper {
padding: 0;
}

.example-container .example-padding {
.example-container .example-padding .react-tooltip-content-wrapper {
padding: 48px;
}

Expand Down
6 changes: 4 additions & 2 deletions docs/versioned_docs/version-5.x/examples/styling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -348,13 +348,15 @@ import { Tooltip } from 'react-tooltip'

### Changing the padding

The default `padding: 8px 16px` is on `.react-tooltip-content-wrapper`. `className` is applied to the tooltip root, so a `padding` rule there is added around the content instead of replacing the default. Set padding on the content wrapper.

#### Removing padding

```jsx
import { Tooltip } from 'react-tooltip'

<style>
.example-container .example-no-padding {
.example-container .example-no-padding .react-tooltip-content-wrapper {
padding: 0;
}
</style>
Expand Down Expand Up @@ -383,7 +385,7 @@ import { Tooltip } from 'react-tooltip'
import { Tooltip } from 'react-tooltip'

<style>
.example-container .example-padding {
.example-container .example-padding .react-tooltip-content-wrapper {
padding: 48px;
}
</style>
Expand Down
Loading