2020-04-14 11:28:33 +02:00
|
|
|
import { Component, Input, OnInit } from '@angular/core';
|
2019-11-23 14:30:19 +01:00
|
|
|
|
|
|
|
interface Item {
|
2020-04-21 10:50:26 +02:00
|
|
|
label: string;
|
|
|
|
value: string;
|
2019-11-23 14:30:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
interface SelectorConfig {
|
2020-04-21 10:50:26 +02:00
|
|
|
label: string;
|
|
|
|
name: string;
|
|
|
|
id: string;
|
|
|
|
selectorNgModel: any;
|
|
|
|
listItems: Item[];
|
2019-11-23 14:30:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Component({
|
2020-04-21 10:50:26 +02:00
|
|
|
selector: 'framadate-selector',
|
|
|
|
templateUrl: './selector.component.html',
|
|
|
|
styleUrls: ['./selector.component.scss'],
|
2019-11-23 14:30:19 +01:00
|
|
|
})
|
|
|
|
export class SelectorComponent implements OnInit {
|
2020-04-21 10:50:26 +02:00
|
|
|
@Input() selectorConfig: SelectorConfig;
|
2019-11-23 14:30:19 +01:00
|
|
|
|
2020-04-21 10:50:26 +02:00
|
|
|
constructor() {}
|
2019-11-23 14:30:19 +01:00
|
|
|
|
2020-04-21 10:50:26 +02:00
|
|
|
ngOnInit() {}
|
2019-11-23 14:30:19 +01:00
|
|
|
}
|