mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
Break word on InfoTooltip (#3532)
* Break word on InfoTooltip * Moving style object to separate const
This commit is contained in:
committed by
Maxime Beauchemin
parent
c629282ec4
commit
f0636b8748
@@ -21,10 +21,15 @@ const defaultProps = {
|
||||
export default function InfoTooltipWithTrigger({
|
||||
label, tooltip, icon, className, onClick, placement, bsStyle }) {
|
||||
const iconClass = `fa fa-${icon} ${className} ${bsStyle ? 'text-' + bsStyle : ''}`;
|
||||
const tooltipStyle = { wordWrap: 'break-word' };
|
||||
return (
|
||||
<OverlayTrigger
|
||||
placement={placement}
|
||||
overlay={<Tooltip id={`${slugify(label)}-tooltip`}>{tooltip}</Tooltip>}
|
||||
overlay={
|
||||
<Tooltip id={`${slugify(label)}-tooltip`} style={tooltipStyle}>
|
||||
{tooltip}
|
||||
</Tooltip>
|
||||
}
|
||||
>
|
||||
<i
|
||||
className={iconClass}
|
||||
|
||||
Reference in New Issue
Block a user