added some reusable form controls

This commit is contained in:
Jonas Winkler 2020-10-28 18:02:30 +01:00
parent 11af74ba36
commit b35e1bacd4
14 changed files with 217 additions and 1 deletions

View file

@ -0,0 +1,31 @@
import { Component, forwardRef, Input, OnInit } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import { v4 as uuidv4 } from 'uuid';
import { AbstractInputComponent } from '../abstract-input';
@Component({
providers: [{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => SelectComponent),
multi: true
}],
selector: 'app-input-select',
templateUrl: './select.component.html',
styleUrls: ['./select.component.css']
})
export class SelectComponent extends AbstractInputComponent<number> {
constructor() {
super()
}
@Input()
items: any[]
@Input()
textColor: any
@Input()
backgroundColor: any
}