Skip to content

Commit

Permalink
fix: theme body class
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesjo committed Nov 13, 2018
1 parent ab6b67c commit c4c1298
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/app/app.component.ts
Expand Up @@ -91,13 +91,17 @@ export class AppComponent implements OnInit {
this._overlayContainer.getContainerElement().classList.add(theme);
this._el.nativeElement.classList.add(theme);

isDarkTheme
? this._el.nativeElement.classList.add('isDarkTheme')
: this._el.nativeElement.classList.remove('isDarkTheme');

isDarkTheme
? this._overlayContainer.getContainerElement().classList.add('isDarkTheme')
: this._overlayContainer.getContainerElement().classList.remove('isDarkTheme');
if (isDarkTheme) {
this._el.nativeElement.classList.remove('isLightTheme');
this._overlayContainer.getContainerElement().classList.remove('isLightTheme');
this._el.nativeElement.classList.add('isDarkTheme');
this._overlayContainer.getContainerElement().classList.add('isDarkTheme');
} else {
this._el.nativeElement.classList.remove('isDarkTheme');
this._overlayContainer.getContainerElement().classList.remove('isDarkTheme');
this._el.nativeElement.classList.add('isLightTheme');
this._overlayContainer.getContainerElement().classList.add('isLightTheme');
}
this._currentTheme = theme;
}

Expand Down

0 comments on commit c4c1298

Please sign in to comment.