Skip to content

Commit 817f307

Browse files
feat(ui): Support customizing help tooltip in FieldGroup (#81136)
need to be able to make the tooltip hoverable for a link in the help tooltip
1 parent 17591c8 commit 817f307

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

static/app/components/forms/fieldGroup/index.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,12 @@ function FieldGroup({
9696
</span>
9797
{helpElement && showHelpInTooltip && (
9898
<FieldQuestion>
99-
<QuestionTooltip position="top" size="sm" title={helpElement} />
99+
<QuestionTooltip
100+
position="top"
101+
size="sm"
102+
{...(showHelpInTooltip !== true ? showHelpInTooltip : {})}
103+
title={helpElement}
104+
/>
100105
</FieldQuestion>
101106
)}
102107
</FieldLabel>

static/app/components/forms/fieldGroup/types.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import type {TooltipProps} from 'sentry/components/tooltip';
2+
13
/**
24
* Props that control UI elements that are part of a Form Group
35
*/
@@ -91,9 +93,10 @@ export interface FieldGroupProps {
9193
*/
9294
required?: boolean;
9395
/**
94-
* Displays the help element in the tooltip
96+
* Displays the help element in the tooltip. Tooltip props may be passed to
97+
* customize the help tooltip.
9598
*/
96-
showHelpInTooltip?: boolean;
99+
showHelpInTooltip?: boolean | Omit<TooltipProps, 'title'>;
97100
/**
98101
* When stacking forms the bottom border is hidden and padding is adjusted
99102
* for form elements to be stacked on each other.

0 commit comments

Comments
 (0)