Skip to content

Commit

Permalink
feat(theme): add themeChanged observable
Browse files Browse the repository at this point in the history
  • Loading branch information
Enlcxx committed Feb 22, 2022
1 parent a80c34d commit c486298
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/src/theme/theme2.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ export class LyTheme2 {
return this._directionChanged.asObservable();
}

/** Event emitted when the theme has changed. */
private _themeChanged = new Subject<void>();
readonly themeChanged = this._themeChanged.asObservable();

/** Get Theme Variables */
get variables(): ThemeVariables {
return this.config;
Expand Down Expand Up @@ -216,6 +220,7 @@ export class LyTheme2 {
theme.change = themeName;
this.config = this.core.get(themeName)!;
this._updateAllStyles();
this._themeChanged.next();
}
}

Expand Down

0 comments on commit c486298

Please sign in to comment.