Commit 5bee9dc7 by Orkhan Alikhanov

Added ability to disable theming globally

parent 2dd29bba
......@@ -74,6 +74,9 @@ public struct Theme: Hashable {
/// Text and iconography color to be used on error color.
public var onError = Color.white
/// A boolean indicating if theming is enabled globally.
public static var isEnabled = true
/// An initializer.
public init() { }
}
......@@ -175,7 +178,7 @@ public extension Themeable where Self: NSObject {
/// A class-wide boolean indicating if theming is enabled.
static var isThemingEnabled: Bool {
get {
return AssociatedObject.get(base: self, key: &IsThemingEnabledKey) {
return Theme.isEnabled && AssociatedObject.get(base: self, key: &IsThemingEnabledKey) {
true
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment