From 12d220d05ef0daf8b8fc99c784ec27924f439164 Mon Sep 17 00:00:00 2001 From: Lache Melvin Date: Thu, 1 Feb 2024 17:36:03 +1300 Subject: [PATCH] move tooltip inside button --- .../buttons/standard/ButtonWithIcon.tsx | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/frontend/common/src/ui/components/buttons/standard/ButtonWithIcon.tsx b/frontend/common/src/ui/components/buttons/standard/ButtonWithIcon.tsx index 992678a11..3809032c5 100644 --- a/frontend/common/src/ui/components/buttons/standard/ButtonWithIcon.tsx +++ b/frontend/common/src/ui/components/buttons/standard/ButtonWithIcon.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { ButtonProps, Tooltip } from '@mui/material'; +import { Box, ButtonProps, Tooltip } from '@mui/material'; import { ShrinkableBaseButton } from './ShrinkableBaseButton'; import { useIsScreen } from '@common/hooks'; @@ -41,23 +41,25 @@ export const ButtonWithIcon: React.FC = ({ const text = shrink ? null : label; return ( - - - - {centeredIcon} - {text} - - - + + + + + {centeredIcon} + {text} + + + + ); };