feat(temperature): temp widget themes support

This commit is contained in:
nixa 2017-07-06 22:33:06 +03:00
parent 422880dddf
commit 33a21d559b
2 changed files with 49 additions and 29 deletions

View file

@ -1,4 +1,5 @@
import { Component } from '@angular/core';
import { NgaThemeService } from '@akveo/nga-theme';
@Component({
selector: 'ngx-temperature',
@ -8,7 +9,8 @@ import { Component } from '@angular/core';
<nga-tabset fullWidth>
<nga-tab tabTitle="Temperature">
<ngx-temperature-dragger [(value)]="temperature" [arcThickness]="20" [knobRadius]="15" [bottomAngle]="90"
disableArcColor="#2c2961" [fillColors]="['#2ec6ff', '#31ffad', '#7bff24', '#EAE75F']">
[disableArcColor]="themeConfig.layoutBg"
[fillColors]="[themeConfig.colorInfo, themeConfig.colorSuccess, themeConfig.colorWarning]">
</ngx-temperature-dragger>
</nga-tab>
<nga-tab tabTitle="Humidity">
@ -20,4 +22,12 @@ import { Component } from '@angular/core';
})
export class TemperatureComponent {
temperature = 0.5;
themeConfig = {};
constructor(private theme: NgaThemeService) {
this.theme.getConfig().subscribe((config) => {
this.themeConfig = config;
});
}
}