Skip to content

Commit

Permalink
fix(tooltip): remove safari hack
Browse files Browse the repository at this point in the history
  • Loading branch information
msyavuz committed Oct 30, 2024
1 parent bfe2118 commit 34f4d71
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions superset-frontend/src/components/Tooltip/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,19 @@
* specific language governing permissions and limitations
* under the License.
*/
import { useTheme, css } from '@superset-ui/core';
import { useTheme } from '@superset-ui/core';
import { Tooltip as AntdTooltip } from 'antd';
import {
TooltipProps,
TooltipPlacement as AntdTooltipPlacement,
} from 'antd/lib/tooltip';
import { Global } from '@emotion/react';

export type TooltipPlacement = AntdTooltipPlacement;

export const Tooltip = (props: TooltipProps) => {
const theme = useTheme();
return (
<>
{/* Safari hack to hide browser default tooltips */}
<Global
styles={css`
.ant-tooltip-open {
display: inline-block;
&::after {
content: '';
display: block;
}
}
.ant-tooltip-inner > p {
margin: 0;
}
`}
/>
<AntdTooltip
overlayStyle={{ fontSize: theme.typography.sizes.s, lineHeight: '1.6' }}
overlayInnerStyle={{
Expand Down

0 comments on commit 34f4d71

Please sign in to comment.