interval-picker/interval-picker.component.ts
| providers |
)
|
| selector | c8y-interval-picker |
| standalone | true |
| imports |
A11yModule
BsDropdownModule
|
| templateUrl | ./interval-picker.component.html |
CommonModule
FormsModule
A11yModule
ReactiveFormsModule
BsDropdownModule
)
ControlValueAccessor
@for (interval of translatedIntervals; track interval.id) {
<li
[ngClass]="{
active: interval.id === value
}"
>
<button
type="button"
[attr.data-cy]="'interval-picker--' + interval.id"
(click)="onChange(interval.id)"
>
<span
[ngClass]="{
'text-primary': interval.id === value
}"
>
<span
c8yIcon="check"
[ngStyle]="{ visibility: interval.id === value ? 'visible' : 'hidden' }"
></span>
{{ interval.title }}
</span>
</button>
</li>
}