Merge ed6a8fda9e
into 2ff3fa92fb
This commit is contained in:
commit
cb044a7930
|
@ -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
|
||||
|
|
|
@ -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>) {
|
||||
|
|
Loading…
Reference in New Issue