From b819b3a8154afce1fa65b8fec506db3fc008fb57 Mon Sep 17 00:00:00 2001 From: Pratik Chandra Pal Date: Wed, 4 Dec 2024 20:56:55 +0530 Subject: [PATCH] style(tooltip): changes made using sistentThemeProvider Signed-off-by: Pratik Chandra Pal --- src/custom/CustomTooltip/customTooltip.tsx | 94 +++++++++++----------- 1 file changed, 48 insertions(+), 46 deletions(-) diff --git a/src/custom/CustomTooltip/customTooltip.tsx b/src/custom/CustomTooltip/customTooltip.tsx index 3552502d..dc4bd7fb 100644 --- a/src/custom/CustomTooltip/customTooltip.tsx +++ b/src/custom/CustomTooltip/customTooltip.tsx @@ -1,8 +1,6 @@ -import { Tooltip, type TooltipProps } from '@mui/material'; -import Typography from '@mui/material/Typography'; -import { styled } from '@mui/material/styles'; +import { Tooltip, Typography, styled, type TooltipProps } from '@mui/material'; import React from 'react'; -import { WHITE } from '../../theme'; +import { SistentThemeProvider, WHITE } from '../../theme'; import { RenderMarkdownTooltip } from '../Markdown'; type CustomTooltipProps = { @@ -15,8 +13,10 @@ type CustomTooltipProps = { bgColor?: string; } & Omit; -const StyledFontWrapper = styled(Typography)(() => ({ - fontFamily: ['Qanelas Soft Regular'].join(',') +const StyledFontWrapper = styled(Typography)(({ theme }) => ({ + ...theme.typography.textH2Medium, + fontSize: '1rem', + lineHeight: '1.5rem' })); function CustomTooltip({ @@ -31,48 +31,50 @@ function CustomTooltip({ ...props }: CustomTooltipProps): JSX.Element { return ( - + + + + ) : ( + title + ) } - }} - title={ - typeof title === 'string' ? ( - - - - ) : ( - title - ) - } - placement={placement} - arrow - onClick={onClick} - {...props} - > - {children} - + placement={placement} + arrow + onClick={onClick} + {...props} + > + {children} + + ); }