Skip to content

Commit 83c4579

Browse files
[PM-14292] Update dialog header to truncate past 2 lines (#15708)
* Update dialog header to truncate past 2 lines * Fix case where title is one long word * Fix random white space * Fix one long word to truncate * Switch to break words * Remove pre-line
1 parent 8315c68 commit 83c4579

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

libs/components/src/dialog/dialog/dialog.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
bitDialogTitleContainer
2121
bitTypography="h3"
2222
noMargin
23-
class="tw-text-main tw-mb-0 tw-truncate"
23+
class="tw-text-main tw-mb-0 tw-line-clamp-2 tw-text-ellipsis tw-break-words"
2424
>
2525
{{ title() }}
2626
@if (subtitle(); as subtitleText) {

libs/components/src/dialog/dialog/dialog.stories.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,15 @@ export const LongTitle: Story = {
125125
...Default,
126126
args: {
127127
dialogSize: "small",
128-
title: "Long_Title_That_Should_Be_Truncated",
128+
title: "Incredibly_Super_Long_Title_That_Should_Be_Truncated",
129+
},
130+
};
131+
132+
export const LongTitleSentence: Story = {
133+
...Default,
134+
args: {
135+
dialogSize: "small",
136+
title: "Very Long Sentence That Should Be Truncated After Two Lines",
129137
},
130138
};
131139

0 commit comments

Comments
 (0)