From fc17ee27697c5f8a9fe8bba1dd0cfd786d9e636d Mon Sep 17 00:00:00 2001 From: Rudraksh Tyagi <59254790+dragon-slayer875@users.noreply.github.com> Date: Mon, 20 May 2024 14:59:40 +0530 Subject: [PATCH] feat: add bgColor prop to custom tooltip Signed-off-by: Rudraksh Tyagi <59254790+dragon-slayer875@users.noreply.github.com> --- src/custom/CustomTooltip/customTooltip.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/custom/CustomTooltip/customTooltip.tsx b/src/custom/CustomTooltip/customTooltip.tsx index d3027679..8efe4423 100644 --- a/src/custom/CustomTooltip/customTooltip.tsx +++ b/src/custom/CustomTooltip/customTooltip.tsx @@ -10,6 +10,7 @@ type CustomTooltipProps = { fontSize?: string; fontWeight?: number; variant?: 'standard' | 'small'; + bgColor?: string; } & Omit; function CustomTooltip({ @@ -20,6 +21,7 @@ function CustomTooltip({ fontSize, fontWeight = 400, variant = 'small', + bgColor = CHARCOAL, ...props }: CustomTooltipProps): JSX.Element { return ( @@ -27,7 +29,7 @@ function CustomTooltip({ componentsProps={{ tooltip: { sx: { - background: CHARCOAL, + background: bgColor, color: WHITE, fontSize: fontSize || (variant === 'standard' ? '1rem' : '0.75rem'), fontWeight: { fontWeight },