mirror of
https://github.com/akveo/ngx-admin.git
synced 2026-03-09 07:02:35 +01:00
feat(dashboard): add modes for the temperature component
This commit is contained in:
parent
2b45625202
commit
60bd13a9f3
3 changed files with 73 additions and 28 deletions
|
|
@ -4,36 +4,17 @@ import { NgaThemeService } from '@akveo/nga-theme';
|
|||
@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" (power)="powerOff = !$event" [min]="12" [max]="30"
|
||||
[arcThickness]="20" [knobRadius]="15" [bottomAngle]="90" [disableArcColor]="themeConfig.layoutBg"
|
||||
[fillColors]="[themeConfig.colorInfo, themeConfig.colorSuccess, themeConfig.colorWarning]">
|
||||
|
||||
<div class="temperature" [ngClass]="{ 'off': powerOff }">
|
||||
<div class="value">
|
||||
{{ powerOff ? '--' : (temperature | ngxRound) }}
|
||||
</div>
|
||||
<div class="desc">
|
||||
Celsius
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ngx-temperature-dragger>
|
||||
</nga-tab>
|
||||
<nga-tab tabTitle="Humidity">
|
||||
<span>Content #2</span>
|
||||
</nga-tab>
|
||||
</nga-tabset>
|
||||
</nga-card>
|
||||
`,
|
||||
templateUrl: './temperature.component.html',
|
||||
})
|
||||
export class TemperatureComponent {
|
||||
|
||||
temperature: number = 23;
|
||||
powerOff: boolean = false;
|
||||
temperatureOff: boolean = false;
|
||||
temperatureMode = 'cool';
|
||||
|
||||
humidity: number = 23;
|
||||
humidityOff: boolean = false;
|
||||
humidityMode = 'auto';
|
||||
|
||||
themeConfig: any = {};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue