mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-20 09:20:12 +01:00
25 lines
792 B
TypeScript
25 lines
792 B
TypeScript
import { Component } from '@angular/core';
|
|
import { NbThemeService } from '@nebular/theme';
|
|
import { Observable } from 'rxjs';
|
|
import { map } from 'rxjs/operators';
|
|
|
|
@Component({
|
|
selector: 'ngx-form-inputs',
|
|
styleUrls: ['./form-inputs.component.scss'],
|
|
templateUrl: './form-inputs.component.html',
|
|
})
|
|
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');
|
|
}));
|
|
}
|
|
|
|
public readonly materialTheme$: Observable<boolean>;
|
|
|
|
public starRate: number = 2;
|
|
public heartRate: number = 4;
|
|
public radioGroupValue: string = 'This is value 2';
|
|
}
|