From 6f05295cd0e29f69bf758ca45ff7d938c6010704 Mon Sep 17 00:00:00 2001 From: enes Date: Tue, 6 Aug 2024 13:02:20 +0200 Subject: [PATCH] docs: add comment for TooltipChild --- src/components/TooltipChild.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/TooltipChild.tsx b/src/components/TooltipChild.tsx index d70f916..4b41b72 100644 --- a/src/components/TooltipChild.tsx +++ b/src/components/TooltipChild.tsx @@ -1,5 +1,10 @@ import { forwardRef, PropsWithChildren } from 'react' +/** + * Helper wrapper for custom child components when using `@mui/material/tooltips`. + * Mui Tooltip works out-the-box with other `@mui` components but when using custom they require ref. + * @source https://mui.com/material-ui/react-tooltip/#custom-child-element + */ export const TooltipChild = forwardRef( ({ children, ...rest }, ref) => { return (