Skip to content

Commit

Permalink
fix: add ability to truncate text without spaces in Truncate component (
Browse files Browse the repository at this point in the history
#2584)

* fix: issue with truncating a whole line without spaces

* fix: fix typo

---------

Co-authored-by: Kyrylo Hudym-Levkovych <kyr.hudym@kyrs-MacBook-Pro.local>
  • Loading branch information
khudym and Kyrylo Hudym-Levkovych authored Sep 14, 2023
1 parent 8166992 commit 3db63e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Truncate/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const createCopyElement = (element) => {
const newElement = document.createElement(element.tagName);
newElement.setAttribute(
'style',
`line-height: ${LINE_HEIGHT_VALUE}px; display: inline-block;`,
`line-height: ${LINE_HEIGHT_VALUE}px; display: inline-block; word-break: break-word;`,
);
return newElement;
};
Expand Down

0 comments on commit 3db63e7

Please sign in to comment.