Skip to content

Commit

Permalink
fix: update custom tooltip props to use formatter
Browse files Browse the repository at this point in the history
Signed-off-by: Rudraksh Tyagi <[email protected]>
  • Loading branch information
dragon-slayer875 committed May 4, 2024
1 parent 4fb0178 commit 162c542
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/custom/CustomTooltip/customTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import remarkGfm from 'remark-gfm';
import { CHARCOAL, KEPPEL, WHITE } from '../../theme';

type CustomTooltipProps = {
title: string | React.ReactNode | JSX.Element;
title: string;
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
children: React.ReactNode;
fontSize?: string;
} & Omit<TooltipProps, 'title' | 'onClick'>;

export function getHyperLinkDiv(text: string) {
export function MarkdownFormatter(text: string) {
return (
<Markdown
remarkPlugins={[remarkGfm]}
Expand All @@ -38,7 +38,7 @@ export function getHyperLinkDiv(text: string) {

function CustomTooltip({
title,
onClick = () => { },
onClick = () => {},
placement,
children,
fontSize = '1rem',
Expand All @@ -62,7 +62,7 @@ function CustomTooltip({
}
}
}}
title={title}
title={MarkdownFormatter(title)}
placement={placement}
arrow
onClick={onClick}
Expand Down

0 comments on commit 162c542

Please sign in to comment.