Skip to content

Commit

Permalink
Break word on InfoTooltip (#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 authored and mistercrunch committed Sep 26, 2017
1 parent c629282 commit f0636b8
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 f0636b8

Please sign in to comment.