nativescript-theme-core
Advanced tools
Comparing version 2.0.13 to 2.0.14
@@ -0,1 +1,12 @@ | ||
<a name="2.0.14 beta"></a> | ||
## [2.0.14 beta](https://github.com/NativeScript/theme/compare/v2.0.13...v2.0.14) (2019-09-03) | ||
### Features | ||
* Add typings to make Angular projects in Playground happy | ||
### Fixes | ||
* Fix setMode resets the classes set manually on root | ||
<a name="2.0.13 beta"></a> | ||
@@ -2,0 +13,0 @@ ## [2.0.13 beta](https://github.com/NativeScript/theme/compare/v2.0.12...v2.0.13) (2019-09-03) |
@@ -55,7 +55,7 @@ "use strict"; | ||
class Theme { | ||
static setMode(mode = Theme.Light, root = app.getRootView()) { | ||
static setMode(mode, root = app.getRootView()) { | ||
Theme.currentMode = mode; | ||
Theme.rootView = root; | ||
if (!root) { | ||
if (!root || !mode) { | ||
return; | ||
@@ -82,3 +82,5 @@ } | ||
static getMode() { | ||
return Theme.currentMode; | ||
const root = app.getRootView(); | ||
return Theme.currentMode || ((root.className || "").indexOf(Theme.Dark) !== -1 ? Theme.Dark : Theme.Light); | ||
} | ||
@@ -98,3 +100,2 @@ } | ||
Theme.Dark = "ns-dark"; | ||
Theme.currentMode = Theme.Light; | ||
@@ -101,0 +102,0 @@ exports.default = Theme; |
{ | ||
"name": "nativescript-theme-core", | ||
"version": "2.0.13", | ||
"version": "2.0.14", | ||
"description": "Telerik NativeScript Core Theme", | ||
@@ -5,0 +5,0 @@ "author": "Telerik <support@telerik.com>", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
392006
93
250