2020-03-06 15:47:34 +03:00
|
|
|
import { Component } from '@angular/core';
|
2020-03-06 14:21:17 +03:00
|
|
|
import { NbThemeService } from '@nebular/theme';
|
2020-03-06 15:47:34 +03:00
|
|
|
import { Observable } from 'rxjs';
|
|
|
|
|
import { map } from 'rxjs/operators';
|
2017-05-05 15:49:52 +03:00
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
selector: 'ngx-form-inputs',
|
2017-07-07 15:39:07 +03:00
|
|
|
styleUrls: ['./form-inputs.component.scss'],
|
2017-05-05 15:49:52 +03:00
|
|
|
templateUrl: './form-inputs.component.html',
|
|
|
|
|
})
|
2020-03-06 15:47:34 +03:00
|
|
|
export class FormInputsComponent {
|
|
|
|
|
public constructor(private readonly themeService: NbThemeService) {
|
|
|
|
|
this.materialTheme$ = this.themeService.onThemeChange()
|
|
|
|
|
.pipe(map(theme => {
|
|
|
|
|
const themeName: string = theme?.name || '';
|
|
|
|
|
return themeName.startsWith('material');
|
|
|
|
|
}));
|
|
|
|
|
}
|
2017-07-12 11:16:16 +03:00
|
|
|
|
2020-03-06 15:47:34 +03:00
|
|
|
public readonly materialTheme$: Observable<boolean>;
|
2020-03-06 14:21:17 +03:00
|
|
|
|
|
|
|
|
public starRate: number = 2;
|
|
|
|
|
public heartRate: number = 4;
|
|
|
|
|
public radioGroupValue: string = 'This is value 2';
|
2017-05-05 15:49:52 +03:00
|
|
|
}
|