This commit is contained in:
cd-bitwarden 2024-04-25 16:31:08 -05:00 committed by GitHub
commit cb044a7930
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View File

@ -93,8 +93,9 @@
variant="secondary"
class="tw-ml-1"
[title]="project.name"
maxWidth="tw-max-w-60"
>
{{ project.name | ellipsis: 32 }}
{{ project.name }}
</span>
<span *ngIf="secret.projects.length === 0" bitBadge variant="warning" class="tw-ml-1"
><i class="bwi bwi-fw bwi-exclamation-triangle tw-mr-1" aria-hidden="true"></i

View File

@ -46,7 +46,7 @@ export class BadgeDirective {
]
.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.maxWidth] : []);
}
@HostBinding("attr.title") get title() {
return this.truncate ? this.el.nativeElement.textContent.trim() : null;
@ -62,6 +62,8 @@ export class BadgeDirective {
*/
@Input() truncate = true;
@Input() maxWidth = "tw-max-w-40";
private hasHoverEffects = false;
constructor(private el: ElementRef<HTMLElement>) {