mirror of
https://github.com/akveo/ngx-admin.git
synced 2026-01-26 03:06:09 +01:00
31 lines
725 B
TypeScript
31 lines
725 B
TypeScript
import { Component, OnDestroy } from '@angular/core';
|
|
import { NbThemeService } from '@nebular/theme';
|
|
|
|
@Component({
|
|
selector: 'ngx-temperature',
|
|
styleUrls: ['./temperature.component.scss'],
|
|
templateUrl: './temperature.component.html',
|
|
})
|
|
export class TemperatureComponent implements OnDestroy {
|
|
|
|
temperature = 24;
|
|
temperatureOff = false;
|
|
temperatureMode = 'cool';
|
|
|
|
humidity = 87;
|
|
humidityOff = false;
|
|
humidityMode = 'heat';
|
|
|
|
colors: any;
|
|
themeSubscription: any;
|
|
|
|
constructor(private theme: NbThemeService) {
|
|
this.themeSubscription = this.theme.getJsTheme().subscribe(config => {
|
|
this.colors = config.variables;
|
|
});
|
|
}
|
|
|
|
ngOnDestroy() {
|
|
this.themeSubscription.unsubscribe();
|
|
}
|
|
}
|