1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

[SM-1192] displaying full project name in tooltip and allowing more of project name in bit badge/project column (#8917)

* allowing max width adjustment on bit badge and not truncating the tooltip text on project

* suggested changes from WIll

* updating values
This commit is contained in:
cd-bitwarden
2024-06-04 10:58:09 -04:00
committed by GitHub
parent 490e6c322d
commit ed7a57810e
2 changed files with 5 additions and 2 deletions

View File

@@ -49,7 +49,7 @@ export class BadgeDirective implements FocusableElement {
]
.concat(styles[this.variant])
.concat(this.hasHoverEffects ? hoverStyles[this.variant] : [])
.concat(this.truncate ? ["tw-truncate", "tw-max-w-40"] : []);
.concat(this.truncate ? ["tw-truncate", this.maxWidthClass] : []);
}
@HostBinding("attr.title") get title() {
return this.truncate ? this.el.nativeElement.textContent.trim() : null;
@@ -65,6 +65,8 @@ export class BadgeDirective implements FocusableElement {
*/
@Input() truncate = true;
@Input() maxWidthClass: `tw-max-w-${string}` = "tw-max-w-40";
getFocusTarget() {
return this.el.nativeElement;
}