Skip to content

Commit 39b0112

Browse files
committed
Abstract light version and use it
1 parent 6490e12 commit 39b0112

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Pinwheel/Sources/Pinwheel/Components/Button.swift

+3-1
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,10 @@ public class Button: UIButton {
196196
switch style {
197197
case .primary:
198198
if isEnabled {
199+
let lightModeTraitCollection = UITraitCollection(userInterfaceStyle: .light)
200+
let lightModeColor = UIColor.primaryBackground.resolvedColor(with: lightModeTraitCollection)
199201
configureButtonColors(
200-
titleColor: UIColor.dynamicColor(defaultColor: .white, darkModeColor: .white),
202+
titleColor: lightModeColor,
201203
backgroundColor: .actionText
202204
)
203205
} else {

0 commit comments

Comments
 (0)