Skip to content

Commit

Permalink
fix(tooltip-not-dissapeared): make the tooltip disappear when mouse a…
Browse files Browse the repository at this point in the history
…way (#18892)

* fix(tooltip-not-dissapeared): make the tooltip disappear when mouse away

* fix(tooltip-not-dissapeared): change css props instead of sytles props
  • Loading branch information
prosdev0107 authored Mar 1, 2022
1 parent 37752ce commit ca93d63
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion superset-frontend/src/components/Button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ export default function Button(props: ButtonProps) {
buttonStyle === 'link' ? 'transparent' : backgroundColorDisabled,
borderColor:
buttonStyle === 'link' ? 'transparent' : borderColorDisabled,
pointerEvents: 'none',
},
marginLeft: 0,
'& + .superset-button': {
Expand All @@ -230,7 +231,11 @@ export default function Button(props: ButtonProps) {
>
{/* this ternary wraps the button in a span so that the tooltip shows up
when the button is disabled. */}
{disabled ? <span>{button}</span> : button}
{disabled ? (
<span css={{ cursor: 'not-allowed' }}>{button}</span>
) : (
button
)}
</Tooltip>
);
}
Expand Down

0 comments on commit ca93d63

Please sign in to comment.