From eadd044071966519bc1a72c270d5cd4496f618a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Zbytovsk=C3=BD?= Date: Thu, 9 Jan 2025 12:31:30 +0100 Subject: [PATCH] general: fix TooltipButton to stay open on desktop (#879) --- src/components/utils/TooltipButton.tsx | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/components/utils/TooltipButton.tsx b/src/components/utils/TooltipButton.tsx index dce695d6e..3a5352014 100644 --- a/src/components/utils/TooltipButton.tsx +++ b/src/components/utils/TooltipButton.tsx @@ -54,17 +54,32 @@ export const TooltipButton = ({ tooltip, onClick, color }: Props) => { useClickAwayListener(tooltipRef, hide, isMobile); - return ( + const content = ( + + + + ); + + // There is a bug in MUI, passing `open={undefined}` prop to Tooltip makes it uninteractive TODO check again eg 6/2025, or report + return isMobile ? ( + + {content} + + ) : ( - - - + {content} ); };