mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-16 15:40:11 +01:00
fix(dashboard): improve dropdowns for electricity and traffic charts
This commit is contained in:
parent
f7a61ee809
commit
479ca11ede
2 changed files with 12 additions and 2 deletions
|
|
@ -42,7 +42,8 @@
|
|||
</div>
|
||||
|
||||
<div ngbDropdown [ngClass]="{'ghost-dropdown': currentTheme == 'default'}">
|
||||
<button type="button" class="btn btn-primary" ngbDropdownToggle>
|
||||
<button type="button" ngbDropdownToggle class="btn"
|
||||
[ngClass]="{ 'btn-success': currentTheme == 'default', 'btn-primary': currentTheme != 'default'}">
|
||||
{{ type }}
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { Component } from '@angular/core';
|
||||
import { NbThemeService } from '@nebular/theme';
|
||||
|
||||
@Component({
|
||||
selector: 'ngx-traffic',
|
||||
|
|
@ -8,7 +9,8 @@ import { Component } from '@angular/core';
|
|||
<nb-card-header>
|
||||
<span>Traffic Consumption</span>
|
||||
<div class="ghost-dropdown" ngbDropdown>
|
||||
<button type="button" class="btn btn-sm btn-primary" ngbDropdownToggle>
|
||||
<button type="button" class="btn btn-sm" ngbDropdownToggle
|
||||
[ngClass]="{ 'btn-success': currentTheme == 'default', 'btn-primary': currentTheme != 'default'}">
|
||||
{{ type }}
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
|
|
@ -25,4 +27,11 @@ import { Component } from '@angular/core';
|
|||
export class TrafficComponent {
|
||||
type: string = 'month';
|
||||
types = ['week', 'month', 'year'];
|
||||
currentTheme: string;
|
||||
|
||||
constructor(private themeService: NbThemeService) {
|
||||
this.themeService.getJsTheme().subscribe(theme => {
|
||||
this.currentTheme = theme.name;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue