noydb/oworms-ui

View on GitHub
src/app/component/common/select/select.component.html

Summary

Maintainability
Test Coverage
<div #select
     (click)="invertClosed($event)"
     [class.focused]="!closed"
     [class.fueled]="selected?.length > 0"
     [class.transparent]="transparent"
     class="select">
    <span class="s-title">
        {{ title }}
        <img alt="chevron/arrow icon pointing downwards"
             src="/assets/image/chevron-down.svg"
             (click)="invertClosed($event)"/>
    </span>
    <div [class.closed]="closed" id="options" role="listbox">
        <div (click)="selectItem(item)"
             *ngFor="let item of options"
             [class.selected]="isSelected(item)"
             class="s-option"
             role="option">
            <span class="s-option-l">
                {{ item.label ? item.label : item.value }}
            </span>
        </div>
    </div>
</div>