2017-07-06 19:10:31 +03:00
|
|
|
import { Component } from '@angular/core';
|
2017-07-06 22:33:06 +03:00
|
|
|
import { NgaThemeService } from '@akveo/nga-theme';
|
2017-07-06 19:10:31 +03:00
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
selector: 'ngx-temperature',
|
|
|
|
|
styleUrls: ['./temperature.component.scss'],
|
|
|
|
|
template: `
|
|
|
|
|
<nga-card size="xmedium">
|
|
|
|
|
<nga-tabset fullWidth>
|
|
|
|
|
<nga-tab tabTitle="Temperature">
|
|
|
|
|
<ngx-temperature-dragger [(value)]="temperature" [arcThickness]="20" [knobRadius]="15" [bottomAngle]="90"
|
2017-07-06 22:33:06 +03:00
|
|
|
[disableArcColor]="themeConfig.layoutBg"
|
|
|
|
|
[fillColors]="[themeConfig.colorInfo, themeConfig.colorSuccess, themeConfig.colorWarning]">
|
2017-07-06 19:10:31 +03:00
|
|
|
</ngx-temperature-dragger>
|
|
|
|
|
</nga-tab>
|
|
|
|
|
<nga-tab tabTitle="Humidity">
|
|
|
|
|
<span>Content #2</span>
|
|
|
|
|
</nga-tab>
|
|
|
|
|
</nga-tabset>
|
|
|
|
|
</nga-card>
|
|
|
|
|
`,
|
|
|
|
|
})
|
|
|
|
|
export class TemperatureComponent {
|
|
|
|
|
temperature = 0.5;
|
2017-07-06 22:33:06 +03:00
|
|
|
|
|
|
|
|
themeConfig = {};
|
|
|
|
|
|
|
|
|
|
constructor(private theme: NgaThemeService) {
|
|
|
|
|
this.theme.getConfig().subscribe((config) => {
|
|
|
|
|
this.themeConfig = config;
|
|
|
|
|
});
|
|
|
|
|
}
|
2017-07-06 19:10:31 +03:00
|
|
|
}
|