Skip to content

Commit

Permalink
feat(dropdown-select): display selected counter and arrow
Browse files Browse the repository at this point in the history
only use mel-primary-button tailwind component here instead of angular component
  • Loading branch information
tkohr committed Feb 21, 2024
1 parent 00038a3 commit 9ac27e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
<mel-datahub-button
[label]="title"
[icon]="'arrow-down'"
<button
class="mel-primary-button"
[attr.aria-owns]="id"
(click)="openOverlay()"
(keydown)="handleTriggerKeydown($event)"
cdkOverlayOrigin
#overlayOrigin="cdkOverlayOrigin"
>
{{ title }}
<div class="grow flex items-center mr-2 gap-2 overflow-hidden">
<div class="text-left font-medium truncate py-1">
{{ title }}
</div>
<div
*ngIf="hasSelectedChoices"
class="shrink-0 rounded-full text-white bg-primary-opacity-25 font-bold text-[12px] w-5 h-5 flex items-center justify-center mr-1 selected-count"
class="shrink-0 rounded-full text-primary bg-white font-bold text-[12px] w-5 h-5 flex items-center justify-center mr-1 selected-count"
>
{{ selected['length'] }}
</div>
Expand All @@ -27,11 +24,11 @@
close
</mat-icon>
</button>
<mat-icon class="material-symbols-outlined shrink-0 opacity-40">
<mat-icon class="material-symbols-outlined shrink-0">
<ng-container *ngIf="overlayOpen">expand_less</ng-container>
<ng-container *ngIf="!overlayOpen">expand_more</ng-container>
</mat-icon>
</mel-datahub-button>
</button>

<ng-template
cdkConnectedOverlay
Expand Down
3 changes: 0 additions & 3 deletions apps/datahub/src/assets/icons/arrow-down.svg

This file was deleted.

0 comments on commit 9ac27e6

Please sign in to comment.