Skip to content

Commit b3fbddf

Browse files
feat: add className property to text ellipsis
1 parent 14d4441 commit b3fbddf

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tyk-technologies/tyk-ui",
3-
"version": "4.4.26-alpha1",
3+
"version": "4.4.26-alpha2",
44
"description": "Tyk UI - ui reusable components",
55
"main": "src/index.js",
66
"scripts": {

src/components/TextEllipsis/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Tooltip from "../Tooltip";
77
* The entire text is displayed with the help of Tooltip component
88
*/
99

10-
function TextEllipsis({ text, limit, position, truncateFrom = "end" }) {
10+
function TextEllipsis({ className, text, limit, position, truncateFrom = "end" }) {
1111
if (text.length <= limit) {
1212
return text;
1313
}
@@ -21,13 +21,14 @@ function TextEllipsis({ text, limit, position, truncateFrom = "end" }) {
2121
}
2222

2323
return (
24-
<Tooltip render={text} position={position}>
24+
<Tooltip className={className} render={text} position={position}>
2525
{displayText}
2626
</Tooltip>
2727
);
2828
}
2929

3030
TextEllipsis.propTypes = {
31+
className: PropTypes.string,
3132
/** Text to be shrinked by TextEllipsis */
3233
text: PropTypes.string,
3334
/** Number of characters that TextEllipsis would leave visible */

0 commit comments

Comments
 (0)