Skip to content

Commit 08c873b

Browse files
Merge pull request layer5io#626 from dragon-slayer875/master
feat: add bgColor prop to custom tooltip
2 parents 929c5f4 + fc17ee2 commit 08c873b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/custom/CustomTooltip/customTooltip.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ type CustomTooltipProps = {
1010
fontSize?: string;
1111
fontWeight?: number;
1212
variant?: 'standard' | 'small';
13+
bgColor?: string;
1314
} & Omit<TooltipProps, 'title' | 'onClick'>;
1415

1516
function CustomTooltip({
@@ -20,14 +21,15 @@ function CustomTooltip({
2021
fontSize,
2122
fontWeight = 400,
2223
variant = 'small',
24+
bgColor = CHARCOAL,
2325
...props
2426
}: CustomTooltipProps): JSX.Element {
2527
return (
2628
<Tooltip
2729
componentsProps={{
2830
tooltip: {
2931
sx: {
30-
background: CHARCOAL,
32+
background: bgColor,
3133
color: WHITE,
3234
fontSize: fontSize || (variant === 'standard' ? '1rem' : '0.75rem'),
3335
fontWeight: { fontWeight },

0 commit comments

Comments
 (0)