File tree Expand file tree Collapse file tree 4 files changed +39
-12
lines changed
packages/compass-indexes/src/components Expand file tree Collapse file tree 4 files changed +39
-12
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,16 @@ const PropertyBadgeWithTooltip: React.FunctionComponent<{
4343 return (
4444 < Tooltip
4545 enabled = { ! ! tooltip }
46- trigger = { < BadgeWithIconLink link = { link } text = { text } /> }
46+ trigger = { ( {
47+ children : tooltipChildren ,
48+ ...tooltipTriggerProps
49+ } : React . HTMLProps < HTMLDivElement > ) => (
50+ < div { ...tooltipTriggerProps } >
51+ < BadgeWithIconLink link = { link } text = { text } />
52+ { tooltipChildren }
53+ </ div >
54+ ) }
55+ triggerEvent = "hover"
4756 >
4857 < Body > { tooltip } </ Body >
4958 </ Tooltip >
Original file line number Diff line number Diff line change @@ -35,11 +35,17 @@ const BadgeWithTooltip: React.FunctionComponent<{
3535 < Tooltip
3636 enabled = { ! ! tooltip }
3737 darkMode = { darkMode }
38- trigger = {
39- < Badge data-testid = { dataTestId } variant = { variant } >
40- { children }
41- </ Badge >
42- }
38+ trigger = { ( {
39+ children : tooltipChildren ,
40+ ...tooltipTriggerProps
41+ } : React . HTMLProps < HTMLDivElement > ) => (
42+ < div { ...tooltipTriggerProps } >
43+ < Badge data-testid = { dataTestId } variant = { variant } >
44+ { children }
45+ </ Badge >
46+ { tooltipChildren }
47+ </ div >
48+ ) }
4349 >
4450 < Body > { tooltip } </ Body >
4551 </ Tooltip >
Original file line number Diff line number Diff line change @@ -44,9 +44,15 @@ const TypeField: React.FunctionComponent<TypeFieldProps> = ({
4444 return (
4545 < Tooltip
4646 enabled = { canRenderTooltip ( type ) }
47- trigger = {
48- < BadgeWithIconLink text = { type ?? 'unknown' } link = { link ?? '#' } />
49- }
47+ trigger = { ( {
48+ children : tooltipChildren ,
49+ ...tooltipTriggerProps
50+ } : React . HTMLProps < HTMLDivElement > ) => (
51+ < div { ...tooltipTriggerProps } >
52+ < BadgeWithIconLink text = { type ?? 'unknown' } link = { link ?? '#' } />
53+ { tooltipChildren }
54+ </ div >
55+ ) }
5056 >
5157 { extra && < IndexTypeTooltip extra = { extra } /> }
5258 </ Tooltip >
Original file line number Diff line number Diff line change @@ -148,9 +148,15 @@ function VectorSearchIndexDetails({ definition }: { definition: Document }) {
148148 align = "top"
149149 key = { field . path }
150150 justify = "middle"
151- trigger = {
152- < Badge className = { searchIndexFieldStyles } > { field . path } </ Badge >
153- }
151+ trigger = { ( {
152+ children : tooltipChildren ,
153+ ...tooltipTriggerProps
154+ } : React . HTMLProps < HTMLDivElement > ) => (
155+ < div { ...tooltipTriggerProps } >
156+ < Badge className = { searchIndexFieldStyles } > { field . path } </ Badge >
157+ { tooltipChildren }
158+ </ div >
159+ ) }
154160 >
155161 { JSON . stringify ( field , null , 2 ) }
156162 </ Tooltip >
You can’t perform that action at this time.
0 commit comments