mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
[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
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
bitDialogTitleContainer
|
||||
bitTypography="h3"
|
||||
noMargin
|
||||
class="tw-text-main tw-mb-0 tw-truncate"
|
||||
class="tw-text-main tw-mb-0 tw-line-clamp-2 tw-text-ellipsis tw-break-words"
|
||||
>
|
||||
{{ title() }}
|
||||
@if (subtitle(); as subtitleText) {
|
||||
|
||||
@@ -125,7 +125,15 @@ export const LongTitle: Story = {
|
||||
...Default,
|
||||
args: {
|
||||
dialogSize: "small",
|
||||
title: "Long_Title_That_Should_Be_Truncated",
|
||||
title: "Incredibly_Super_Long_Title_That_Should_Be_Truncated",
|
||||
},
|
||||
};
|
||||
|
||||
export const LongTitleSentence: Story = {
|
||||
...Default,
|
||||
args: {
|
||||
dialogSize: "small",
|
||||
title: "Very Long Sentence That Should Be Truncated After Two Lines",
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user