Skip to content

Commit 34d36aa

Browse files
Merge pull request #368 from nginformatica/fix/tooltip-props
Fix/tooltip props
2 parents 85fccb3 + 48fc2b7 commit 34d36aa

File tree

3 files changed

+175
-162
lines changed

3 files changed

+175
-162
lines changed

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flipper-ui",
3-
"version": "0.35.5",
3+
"version": "0.35.6",
44
"description": "React UI based on the @mui/material toolkit for the web",
55
"main": "dist/index.js",
66
"author": "NG",
@@ -35,7 +35,7 @@
3535
"@mui/icons-material": "6.4.2",
3636
"@mui/material": "6.4.2",
3737
"@mui/system": "6.4.2",
38-
"@mui/x-date-pickers": "7.24.1",
38+
"@mui/x-date-pickers": "7.25.0",
3939
"ramda": "0.30.1",
4040
"react-loading-skeleton": "3.5.0",
4141
"react-number-format": "5.4.3"
@@ -48,18 +48,18 @@
4848
"@babel/preset-react": "7.26.3",
4949
"@babel/preset-typescript": "7.26.0",
5050
"@faker-js/faker": "9.4.0",
51-
"@storybook/addon-essentials": "8.5.2",
51+
"@storybook/addon-essentials": "8.5.3",
5252
"@storybook/addon-webpack5-compiler-babel": "3.0.5",
53-
"@storybook/blocks": "8.5.2",
54-
"@storybook/react": "8.5.2",
55-
"@storybook/react-webpack5": "8.5.2",
53+
"@storybook/blocks": "8.5.3",
54+
"@storybook/react": "8.5.3",
55+
"@storybook/react-webpack5": "8.5.3",
5656
"@stylistic/eslint-plugin": "3.0.1",
5757
"@testing-library/dom": "10.4.0",
5858
"@testing-library/jest-dom": "6.6.3",
5959
"@testing-library/react": "16.2.0",
6060
"@testing-library/user-event": "14.6.1",
6161
"@types/jest": "29.5.14",
62-
"@types/node": "22.12.0",
62+
"@types/node": "22.13.0",
6363
"@types/ramda": "0.30.2",
6464
"@types/react": "18.3.12",
6565
"@types/uuid": "10.0.0",
@@ -83,7 +83,7 @@
8383
"prettier": "3.4.2",
8484
"react": "18.3.1",
8585
"react-dom": "18.3.1",
86-
"storybook": "8.5.2",
86+
"storybook": "8.5.3",
8787
"styled-components": "6.1.14",
8888
"ts-jest": "29.2.5",
8989
"ts-loader": "9.5.2",

src/core/feedback/tooltip/index.tsx

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import React from 'react'
22
import type { ReactElement, CSSProperties, ReactNode } from 'react'
33
import MuiTooltip from '@mui/material/Tooltip'
44
import type { DefaultProps } from '../../types'
5+
import type { TooltipProps as MuiTooltipProps } from '@mui/material/Tooltip'
56

6-
export interface TooltipProps extends DefaultProps {
7+
export interface TooltipProps extends DefaultProps, MuiTooltipProps {
78
placement?:
89
| 'bottom-end'
910
| 'bottom-start'
@@ -25,17 +26,29 @@ export interface TooltipProps extends DefaultProps {
2526
open?: boolean
2627
children: ReactElement<Record<string, unknown>>
2728
enterDelay?: number
29+
zIndex?: number
2830
}
2931

3032
const Tooltip = ({
33+
title,
34+
zIndex,
3135
children,
3236
withWrapper,
3337
wrapperStyle,
3438
enterDelay = 1000,
35-
title,
3639
...otherProps
3740
}: TooltipProps) => (
38-
<MuiTooltip title={title || ''} enterDelay={enterDelay} {...otherProps}>
41+
<MuiTooltip
42+
title={title || ''}
43+
enterDelay={enterDelay}
44+
slotProps={{
45+
popper: {
46+
sx: {
47+
zIndex: zIndex || 9999
48+
}
49+
}
50+
}}
51+
{...otherProps}>
3952
{withWrapper ? (
4053
<div
4154
style={{

0 commit comments

Comments
 (0)