@ecodev/natural 66.0.1 → 66.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5339,6 +5339,9 @@ class NaturalThemeService {
|
|
|
5339
5339
|
effect(() => {
|
|
5340
5340
|
this.document.documentElement.setAttribute('data-is-dark', this.isDark() ? 'true' : 'false');
|
|
5341
5341
|
});
|
|
5342
|
+
const storedScheme = this.storage.getItem('color-scheme');
|
|
5343
|
+
const isValidScheme = storedScheme && Object.values(ColorScheme).includes(storedScheme);
|
|
5344
|
+
this.colorScheme.set(isValidScheme ? storedScheme : ColorScheme.Auto);
|
|
5342
5345
|
}
|
|
5343
5346
|
/**
|
|
5344
5347
|
* Set theme in memory, local storage and dom
|