Skip to content

react-tooltip__show class when tooltip is open #1078

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 3, 2023
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
1 change: 1 addition & 0 deletions src/components/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,7 @@ const Tooltip = ({
className,
`react-tooltip__place-${actualPlacement}`,
{
'react-tooltip__show': canShow,
[coreStyles['show']]: canShow,
[coreStyles['fixed']]: positionStrategy === 'fixed',
[coreStyles['clickable']]: clickable,
Expand Down
4 changes: 2 additions & 2 deletions src/test/__snapshots__/tooltip-attributes.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exports[`tooltip attributes basic tooltip 1`] = `
Lorem Ipsum
</span>
<div
class="react-tooltip react-tooltip__place-top"
class="react-tooltip react-tooltip__place-top react-tooltip__show"
role="tooltip"
style="left: 5px; top: -10px;"
>
Expand All @@ -32,7 +32,7 @@ exports[`tooltip attributes tooltip with place 1`] = `
Lorem Ipsum
</span>
<div
class="react-tooltip react-tooltip__place-right"
class="react-tooltip react-tooltip__place-right react-tooltip__show"
role="tooltip"
style="left: 10px; top: 5px;"
>
Expand Down
14 changes: 7 additions & 7 deletions src/test/__snapshots__/tooltip-props.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports[`tooltip props basic tooltip 1`] = `
Lorem Ipsum
</span>
<div
class="react-tooltip react-tooltip__place-top"
class="react-tooltip react-tooltip__place-top react-tooltip__show"
role="tooltip"
style="left: 5px; top: -10px;"
>
Expand All @@ -29,7 +29,7 @@ exports[`tooltip props clickable tooltip 1`] = `
Lorem Ipsum
</span>
<div
class="react-tooltip react-tooltip__place-top undefined"
class="react-tooltip react-tooltip__place-top react-tooltip__show undefined"
role="tooltip"
style="left: 5px; top: -10px;"
>
Expand All @@ -52,7 +52,7 @@ exports[`tooltip props tooltip with custom position 1`] = `
Lorem Ipsum
</span>
<div
class="react-tooltip react-tooltip__place-top"
class="react-tooltip react-tooltip__place-top react-tooltip__show"
role="tooltip"
style="left: 5px; top: -10px;"
>
Expand Down Expand Up @@ -83,7 +83,7 @@ exports[`tooltip props tooltip with delay show 1`] = `
Lorem Ipsum
</span>
<div
class="react-tooltip react-tooltip__place-top"
class="react-tooltip react-tooltip__place-top react-tooltip__show"
role="tooltip"
style="left: 5px; top: -10px;"
>
Expand All @@ -104,7 +104,7 @@ exports[`tooltip props tooltip with float 1`] = `
Lorem Ipsum
</span>
<div
class="react-tooltip react-tooltip__place-top"
class="react-tooltip react-tooltip__place-top react-tooltip__show"
role="tooltip"
style="left: 5px; top: -10px;"
>
Expand All @@ -125,7 +125,7 @@ exports[`tooltip props tooltip with html 1`] = `
Lorem Ipsum
</span>
<div
class="react-tooltip react-tooltip__place-top"
class="react-tooltip react-tooltip__place-top react-tooltip__show"
role="tooltip"
style="left: 5px; top: -10px;"
>
Expand All @@ -151,7 +151,7 @@ exports[`tooltip props tooltip with place 1`] = `
Lorem Ipsum
</span>
<div
class="react-tooltip react-tooltip__place-right"
class="react-tooltip react-tooltip__place-right react-tooltip__show"
role="tooltip"
style="left: 10px; top: 5px;"
>
Expand Down