Skip to content

Commit

Permalink
Merge pull request #626 from dragon-slayer875/master
Browse files Browse the repository at this point in the history
feat: add bgColor prop to custom tooltip
  • Loading branch information
sudhanshutech authored May 22, 2024
2 parents 929c5f4 + fc17ee2 commit 08c873b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/custom/CustomTooltip/customTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ type CustomTooltipProps = {
fontSize?: string;
fontWeight?: number;
variant?: 'standard' | 'small';
bgColor?: string;
} & Omit<TooltipProps, 'title' | 'onClick'>;

function CustomTooltip({
Expand All @@ -20,14 +21,15 @@ function CustomTooltip({
fontSize,
fontWeight = 400,
variant = 'small',
bgColor = CHARCOAL,
...props
}: CustomTooltipProps): JSX.Element {
return (
<Tooltip
componentsProps={{
tooltip: {
sx: {
background: CHARCOAL,
background: bgColor,
color: WHITE,
fontSize: fontSize || (variant === 'standard' ? '1rem' : '0.75rem'),
fontWeight: { fontWeight },
Expand Down

0 comments on commit 08c873b

Please sign in to comment.