Compare commits

...

2 Commits

4 changed files with 12 additions and 3 deletions

View File

@ -1,5 +1,10 @@
# Changelog
## 2025-01-09 - 2.1.1 - fix(themamanager)
Fixed automatic global theme change subscription for background updates.
- Corrected the logic for updating the document's background color upon theme changes using themeObservable subscription.
## 2025-01-09 - 2.1.0 - feat(themeManager)
Exposed method to enable automatic global theme change.

View File

@ -1,6 +1,6 @@
{
"name": "@design.estate/dees-domtools",
"version": "2.1.0",
"version": "2.1.1",
"private": false,
"description": "A package providing tools to simplify complex CSS structures and web development tasks, featuring TypeScript support and integration with various web technologies.",
"main": "dist_ts/index.js",

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@design.estate/dees-domtools',
version: '2.1.0',
version: '2.1.1',
description: 'A package providing tools to simplify complex CSS structures and web development tasks, featuring TypeScript support and integration with various web technologies.'
}

View File

@ -23,7 +23,11 @@ export class ThemeManager {
public async enableAutomaticGlobalThemeChange() {
if (document.body && document.body.style) {
document.body.style.background = this.goBrightBoolean ? '#fff' : '#000';
this.themeObservable.subscribe({
next: (goBright) => {
document.body.style.background = goBright ? '#fff' : '#000';
}
});
}
}