From bb916cf90bd3e4629b7a351321b324ac2d4d3bd7 Mon Sep 17 00:00:00 2001 From: Josh Buchea Date: Wed, 3 Sep 2025 10:44:22 -1000 Subject: [PATCH 1/2] add slotProps prop, remove unnecessary custom type --- src/components/Tooltip/Tooltip.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/components/Tooltip/Tooltip.tsx b/src/components/Tooltip/Tooltip.tsx index 01cc3082a..e618e830a 100644 --- a/src/components/Tooltip/Tooltip.tsx +++ b/src/components/Tooltip/Tooltip.tsx @@ -4,11 +4,13 @@ import { Tooltip as MUITooltip, SxProps, TooltipProps, useTheme } from '@mui/mat import { useDeviceInfo } from '../../utils'; -type CustomTooltipProps = TooltipProps & { - sx?: SxProps; -}; - -export default function Tooltip({ placement = 'top-start', sx, title, children }: CustomTooltipProps): JSX.Element { +export default function Tooltip({ + children, + placement = 'top-start', + slotProps, + sx, + title, +}: TooltipProps): JSX.Element { const [open, setOpen] = React.useState(false); const { isMobile } = useDeviceInfo(); const theme = useTheme(); @@ -30,6 +32,7 @@ export default function Tooltip({ placement = 'top-start', sx, title, children } onClose={handleTooltipClose} open={open} placement={placement} + slotProps={slotProps} sx={[ { maxWidth: isMobile ? '342px' : '464px', From d8d70a9ef2da449dc199f228f714b12d5d3ddb5c Mon Sep 17 00:00:00 2001 From: Josh Buchea Date: Wed, 3 Sep 2025 10:51:01 -1000 Subject: [PATCH 2/2] remove unused import --- src/components/Tooltip/Tooltip.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Tooltip/Tooltip.tsx b/src/components/Tooltip/Tooltip.tsx index e618e830a..a3477efde 100644 --- a/src/components/Tooltip/Tooltip.tsx +++ b/src/components/Tooltip/Tooltip.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { Tooltip as MUITooltip, SxProps, TooltipProps, useTheme } from '@mui/material'; +import { Tooltip as MUITooltip, TooltipProps, useTheme } from '@mui/material'; import { useDeviceInfo } from '../../utils';