Skip to content

Commit b42d439

Browse files
committed
5398: Add class for truncating text
1 parent 175a718 commit b42d439

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/stories/Library/typography/Typography.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ const typographyClasses = [
6363
className: "text-label text-label-semibold",
6464
title: "Desktop / Label semibold",
6565
},
66+
{
67+
className: "text-header-h2 text-truncate",
68+
title:
69+
"Truncated text at a 100% width - Here goes all the text nec varius nibh, eu iaculis purus. Aenean tellus nisi, posuere a elit a, finibus elementum lorem.",
70+
},
6671
];
6772

6873
export const Typography = () => {

src/stories/Library/typography/typography.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,3 +335,10 @@
335335

336336
font-weight: 500;
337337
}
338+
339+
.text-truncate {
340+
white-space: nowrap;
341+
overflow: hidden;
342+
text-overflow: ellipsis;
343+
max-width: 100%;
344+
}

0 commit comments

Comments
 (0)