Add fm-gradient-select
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Willem Dantuma
2020-10-06 08:22:10 +02:00
parent f93d235877
commit da2492e017
11 changed files with 224 additions and 57 deletions

View File

@@ -0,0 +1,16 @@
<div *ngIf="gradientItems" class="form-control gradient-select" (click)="handleToggleList()">
<div *ngIf="selectedItem">
<div *ngIf="showLabel">{{selectedItem?.name}}</div>
<fm-gradient [gradientItem]="selectedItem"></fm-gradient>
</div>
<div class="gradient-list" [ngClass]="{'visible':listVisible}">
<ul *ngIf="gradientItems">
<li *ngFor="let item of gradientItems" (click)="handleSelect(item)" [ngClass]="{'bg-primary':isSelected(item),'text-white':isSelected(item)} ">
<div>{{item?.name}}</div>
<div><fm-gradient [gradientItem]="item"></fm-gradient></div>
</li>
</ul>
<div *ngIf="showAdd" class="addGradient"><a href="#" i18n (click)="handleAdd($event)" >Add gradient</a></div>
</div>
</div>