Skip to content

Commit

Permalink
KOA-5572 BPKSwitch semantic colours (#1416)
Browse files Browse the repository at this point in the history
* KOA-5572 update UIKit component

* KOA-5572 update swiftUI

* KOA-5572 update UIKit tests

* KOA-5572 update SwiftUI snapshots

* KOA-5572 update snapshots again

* KOA-5572 update screenshots
  • Loading branch information
gert-janvercauteren authored Sep 13, 2022
1 parent 78a23dd commit 34d854f
Show file tree
Hide file tree
Showing 13 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Backpack-SwiftUI/Switch/Classes/BPKSwitch.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public struct BPKSwitch<Content: View>: View {
Toggle(isOn: $isOn) {
content
}
.toggleStyle(SwitchToggleStyle(tint: Color(.primaryColor)))
.toggleStyle(SwitchToggleStyle(tint: Color(.coreAccentColor)))
}
}

Expand Down
6 changes: 3 additions & 3 deletions Backpack/Switch/Classes/BPKSwitch.m
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ - (void)setPrimaryColor:(UIColor *_Nullable)primaryColor {
}

- (void)updateSwitchOnColor {
self.onTintColor = _primaryColor != nil ? _primaryColor : BPKColor.primaryColor;
self.onTintColor = _primaryColor != nil ? _primaryColor : BPKColor.coreAccentColor;
}

- (void)setup {
self.tintColor = BPKColor.skyGrayTint06;
self.thumbTintColor = BPKColor.white;
self.tintColor = BPKColor.surfaceHighlightColor;
self.thumbTintColor = BPKColor.textOnDarkColor;

[self updateSwitchOnColor];
[self setNeedsDisplay];
Expand Down
Binary file modified ...ack_Unit_SnapshotTests.BPKSwitchSnapshotTest/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...ck_Unit_SnapshotTests.BPKSwitchSnapshotTest/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ..._SnapshotTests.BPKSwitchSnapshotTest/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...SnapshotTests.BPKSwitchSnapshotTest/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...pack_Unit_SnapshotTests.BPKSwitchSnapshotTest/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ...ack_Unit_SnapshotTests.BPKSwitchSnapshotTest/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/iPhone 8-swiftui_switch___default_dm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/iPhone 8-swiftui_switch___default_lm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/iPhone 8-switch___default_dm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/iPhone 8-switch___default_lm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions scripts/take-screenshots
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
rm -rf screenshots

cd Example && bundle exec fastlane snapshot
cd ..
mv screenshots/en-US/* screenshots/

0 comments on commit 34d854f

Please sign in to comment.