Skip to content

Commit 671af7d

Browse files
committed
refactor: relocate renderAsHtml option
1 parent e47a852 commit 671af7d

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/packages/hint/components/HintTooltip.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export type HintTooltipProps = Omit<
1616
closeButtonLabel: string;
1717
closeButtonClassName: string;
1818
className?: string;
19+
renderAsHtml?: boolean;
1920
};
2021

2122
export const HintTooltip = ({
@@ -25,6 +26,7 @@ export const HintTooltip = ({
2526
closeButtonLabel,
2627
closeButtonClassName,
2728
className,
29+
renderAsHtml,
2830
...props
2931
}: HintTooltipProps) => {
3032
const text = hintItem.hint;
@@ -51,7 +53,7 @@ export const HintTooltip = ({
5153
{ className: `${tooltipTextClassName} ${className || ""}` },
5254
TooltipContent({
5355
text: text || "",
54-
tooltipRenderAsHtml: props.renderAsHtml,
56+
tooltipRenderAsHtml: renderAsHtml,
5557
className: tooltipTextClassName,
5658
}),
5759
p(hintItem.hint || ""),

src/packages/tooltip/tooltip.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,6 @@ export type TooltipProps = {
315315
autoPosition: boolean;
316316
positionPrecedence: TooltipPosition[];
317317

318-
renderAsHtml?: boolean;
319-
320318
onClick?: (e: any) => void;
321319
className?: string;
322320
};

src/packages/tour/components/TourTooltip.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,7 @@ export type TourTooltipProps = Omit<
406406

407407
dontShowAgain: boolean;
408408
dontShowAgainLabel: string;
409+
renderAsHtml?: boolean;
409410
onDontShowAgainChange: (checked: boolean) => void;
410411
};
411412

@@ -443,6 +444,7 @@ export const TourTooltip = ({
443444
dontShowAgain,
444445
onDontShowAgainChange,
445446
dontShowAgainLabel,
447+
renderAsHtml,
446448
...props
447449
}: TourTooltipProps) => {
448450
const children = [];
@@ -455,7 +457,7 @@ export const TourTooltip = ({
455457
children.push(
456458
TooltipContent({
457459
text,
458-
tooltipRenderAsHtml: props.renderAsHtml,
460+
tooltipRenderAsHtml: renderAsHtml,
459461
className: tooltipTextClassName,
460462
})
461463
);

0 commit comments

Comments
 (0)