Skip to content

Commit

Permalink
Fix #5932: Inline tooltip PT options respected (#5937)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Feb 10, 2024
1 parent ad01273 commit d6f49ca
Show file tree
Hide file tree
Showing 21 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion components/lib/autocomplete/AutoComplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ export const AutoComplete = React.memo(
sx={sx}
/>
</span>
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} {...props.tooltipOptions} pt={ptm('tooltip')} />}
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} pt={ptm('tooltip')} {...props.tooltipOptions} />}
</>
);
})
Expand Down
2 changes: 1 addition & 1 deletion components/lib/button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export const Button = React.memo(
{badge}
<Ripple />
</button>
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} {...props.tooltipOptions} pt={ptm('tooltip')} />}
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} pt={ptm('tooltip')} {...props.tooltipOptions} />}
</>
);
})
Expand Down
2 changes: 1 addition & 1 deletion components/lib/checkbox/Checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export const Checkbox = React.memo(
</div>
<div {...inputProps}>{checkboxIcon}</div>
</div>
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} {...props.tooltipOptions} pt={ptm('tooltip')} />}
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} pt={ptm('tooltip')} {...props.tooltipOptions} />}
</>
);
})
Expand Down
2 changes: 1 addition & 1 deletion components/lib/chips/Chips.js
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ export const Chips = React.memo(
return (
<>
<div {...rootProps}>{list}</div>
{hasTooltip && <Tooltip target={inputRef} content={props.tooltip} {...props.tooltipOptions} pt={ptm('tooltip')} />}
{hasTooltip && <Tooltip target={inputRef} content={props.tooltip} pt={ptm('tooltip')} {...props.tooltipOptions} />}
</>
);
})
Expand Down
2 changes: 1 addition & 1 deletion components/lib/colorpicker/ColorPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ export const ColorPicker = React.memo(
{content}
</ColorPickerPanel>
</div>
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} {...props.tooltipOptions} pt={ptm('tooltip')} />}
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} pt={ptm('tooltip')} {...props.tooltipOptions} />}
</>
);
})
Expand Down
2 changes: 1 addition & 1 deletion components/lib/datatable/HeaderCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ export const HeaderCell = React.memo((props) => {
{resizer}
{header}
</th>
{hasTooltip && <Tooltip target={elementRef} content={headerTooltip} {...headerTooltipOptions} pt={getColumnPTOptions('tooltip')} unstyled={props.unstyled} />}
{hasTooltip && <Tooltip target={elementRef} content={headerTooltip} pt={getColumnPTOptions('tooltip')} unstyled={props.unstyled} {...headerTooltipOptions} />}
</>
);
};
Expand Down
2 changes: 1 addition & 1 deletion components/lib/dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,7 @@ export const Dropdown = React.memo(
/>
<span {...lastHiddenFocusableElementProps}></span>
</div>
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} {...props.tooltipOptions} pt={ptm('tooltip')} />}
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} pt={ptm('tooltip')} {...props.tooltipOptions} />}
</>
);
})
Expand Down
2 changes: 1 addition & 1 deletion components/lib/inputnumber/InputNumber.js
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,7 @@ export const InputNumber = React.memo(
{inputElement}
{buttonGroup}
</span>
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} {...props.tooltipOptions} pt={ptm('tooltip')} />}
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} pt={ptm('tooltip')} {...props.tooltipOptions} />}
</>
);
})
Expand Down
2 changes: 1 addition & 1 deletion components/lib/inputswitch/InputSwitch.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export const InputSwitch = React.memo(
</div>
<span {...sliderProps}></span>
</div>
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} {...props.tooltipOptions} pt={ptm('tooltip')} />}
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} pt={ptm('tooltip')} {...props.tooltipOptions} />}
</>
);
})
Expand Down
2 changes: 1 addition & 1 deletion components/lib/inputtext/InputText.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export const InputText = React.memo(
return (
<>
<input ref={elementRef} {...rootProps} />
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} {...props.tooltipOptions} pt={ptm('tooltip')} />}
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} pt={ptm('tooltip')} {...props.tooltipOptions} />}
</>
);
})
Expand Down
2 changes: 1 addition & 1 deletion components/lib/inputtextarea/InputTextarea.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export const InputTextarea = React.memo(
return (
<>
<textarea {...rootProps}></textarea>
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} {...props.tooltipOptions} pt={ptm('tooltip')} />}
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} pt={ptm('tooltip')} {...props.tooltipOptions} />}
</>
);
})
Expand Down
2 changes: 1 addition & 1 deletion components/lib/listbox/ListBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ export const ListBox = React.memo(
<div {...wrapperProps}>{list}</div>
<span {...hiddenLastElement}></span>
</div>
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} {...props.tooltipOptions} pt={ptCallbacks.ptm('tooltip')} />}
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} pt={ptCallbacks.ptm('tooltip')} {...props.tooltipOptions} />}
</>
);
})
Expand Down
2 changes: 1 addition & 1 deletion components/lib/multiselect/MultiSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,7 @@ export const MultiSelect = React.memo(
/>
<span {...lastHiddenElementProps}></span>
</div>
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} {...props.tooltipOptions} pt={ptm('tooltip')} />}
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} pt={ptm('tooltip')} {...props.tooltipOptions} />}
</>
);
})
Expand Down
2 changes: 1 addition & 1 deletion components/lib/multistatecheckbox/MultiStateCheckbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export const MultiStateCheckbox = React.memo(
<div {...checkboxProps}>{icon}</div>
{focusedState && <span {...srOnlyAriaProps}>{ariaValueLabel}</span>}
</div>
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} {...props.tooltipOptions} pt={ptm('tooltip')} />}
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} pt={ptm('tooltip')} {...props.tooltipOptions} />}
</>
);
})
Expand Down
2 changes: 1 addition & 1 deletion components/lib/radiobutton/RadioButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export const RadioButton = React.memo(
<div {...iconProps}></div>
</div>
</div>
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} {...props.tooltipOptions} pt={ptm('tooltip')} />}
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} pt={ptm('tooltip')} {...props.tooltipOptions} />}
</>
);
})
Expand Down
2 changes: 1 addition & 1 deletion components/lib/rating/Rating.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export const Rating = React.memo(
{cancelIcon}
{icons}
</div>
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} {...props.tooltipOptions} pt={ptm('tooltip')} />}
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} pt={ptm('tooltip')} {...props.tooltipOptions} />}
</>
);
})
Expand Down
2 changes: 1 addition & 1 deletion components/lib/selectbutton/SelectButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const SelectButton = React.memo(
return (
<>
<div {...rootProps}>{items}</div>
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} {...props.tooltipOptions} pt={ptm('tooltip')} />}
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} pt={ptm('tooltip')} {...props.tooltipOptions} />}
</>
);
})
Expand Down
2 changes: 1 addition & 1 deletion components/lib/splitbutton/SplitButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export const SplitButton = React.memo(
pt={ptm('menu')}
/>
</div>
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} {...props.tooltipOptions} pt={ptm('tooltip')} />}
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} pt={ptm('tooltip')} {...props.tooltipOptions} />}
</>
);
})
Expand Down
2 changes: 1 addition & 1 deletion components/lib/togglebutton/ToggleButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export const ToggleButton = React.memo(
<span {...labelProps}>{label}</span>
<Ripple />
</div>
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} {...props.tooltipOptions} pt={ptm('tooltip')} />}
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} pt={ptm('tooltip')} {...props.tooltipOptions} />}
</>
);
})
Expand Down
2 changes: 1 addition & 1 deletion components/lib/treeselect/TreeSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ export const TreeSelect = React.memo(
>
{content}
</TreeSelectPanel>
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} {...props.tooltipOptions} pt={ptm('tooltip')} />}
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} pt={ptm('tooltip')} {...props.tooltipOptions} />}
</div>
);
})
Expand Down
2 changes: 1 addition & 1 deletion components/lib/tristatecheckbox/TriStateCheckbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export const TriStateCheckbox = React.memo(
<div {...checkboxProps}>{checkIcon}</div>
{focusedState && <span {...srOnlyAriaProps}>{ariaValueLabel}</span>}
</div>
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} {...props.tooltipOptions} pt={ptm('tooltip')} />}
{hasTooltip && <Tooltip target={elementRef} content={props.tooltip} pt={ptm('tooltip')} {...props.tooltipOptions} />}
</>
);
})
Expand Down

0 comments on commit d6f49ca

Please sign in to comment.