Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Commit 8e91f82

Browse files
authored
Merge pull request #562 from wordpress-mobile/wcios-2716/color-updates
Add a new style parameter for spinner color when NUXButton is disabled
2 parents d16b5cb + 30084d9 commit 8e91f82

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

WordPressAuthenticator.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "WordPressAuthenticator"
3-
s.version = "1.33.0"
3+
s.version = "1.34.0-beta.1"
44
s.summary = "WordPressAuthenticator implements an easy and elegant way to authenticate your WordPress Apps."
55

66
s.description = <<-DESC

WordPressAuthenticator/Authenticator/WordPressAuthenticatorStyles.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ public struct WordPressAuthenticatorStyle {
3939

4040
public let disabledTitleColor: UIColor
4141

42+
/// Color of the spinner that is shown when a button is disabled.
43+
public let disabledButtonActivityIndicatorColor: UIColor
44+
4245
/// Style: Text Buttons
4346
///
4447
public let textButtonColor: UIColor
@@ -109,6 +112,7 @@ public struct WordPressAuthenticatorStyle {
109112
primaryTitleColor: UIColor,
110113
secondaryTitleColor: UIColor,
111114
disabledTitleColor: UIColor,
115+
disabledButtonActivityIndicatorColor: UIColor,
112116
textButtonColor: UIColor,
113117
textButtonHighlightColor: UIColor,
114118
instructionColor: UIColor,
@@ -139,6 +143,7 @@ public struct WordPressAuthenticatorStyle {
139143
self.primaryTitleColor = primaryTitleColor
140144
self.secondaryTitleColor = secondaryTitleColor
141145
self.disabledTitleColor = disabledTitleColor
146+
self.disabledButtonActivityIndicatorColor = disabledButtonActivityIndicatorColor
142147
self.textButtonColor = textButtonColor
143148
self.textButtonHighlightColor = textButtonHighlightColor
144149
self.instructionColor = instructionColor

WordPressAuthenticator/NUX/NUXButton.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import WordPressKit
1212
open override var isEnabled: Bool {
1313
didSet {
1414
if #available(iOS 13, *) {
15-
activityIndicator.color = isEnabled ? style.primaryTitleColor : style.secondaryTitleColor
15+
activityIndicator.color = isEnabled ? style.primaryTitleColor : style.disabledButtonActivityIndicatorColor
1616
}
1717
}
1818
}

WordPressAuthenticatorTests/Mocks/WordpressAuthenticatorProvider.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public class WordpressAuthenticatorProvider: NSObject {
3232
primaryTitleColor: UIColor.random(),
3333
secondaryTitleColor: UIColor.random(),
3434
disabledTitleColor: UIColor.random(),
35+
disabledButtonActivityIndicatorColor: UIColor.random(),
3536
textButtonColor: UIColor.random(),
3637
textButtonHighlightColor: UIColor.random(),
3738
instructionColor: UIColor.random(),

0 commit comments

Comments
 (0)