mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
Break word on InfoTooltip (#3532)
* Break word on InfoTooltip * Moving style object to separate const
This commit is contained in:
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}
|
||||
|
Loading…
Reference in New Issue
Block a user