Skip to content

Commit

Permalink
Break word on InfoTooltip (apache#3532)
Browse files Browse the repository at this point in the history
* Break word on InfoTooltip

* Moving style object to separate const
  • Loading branch information
michellethomas committed May 23, 2018
1 parent 406c708 commit 14e82b5
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 14e82b5

Please sign in to comment.