diff --git a/Sources/Compound/Buttons/SendButton.swift b/Sources/Compound/Buttons/SendButton.swift index a9b4713..2f2526c 100644 --- a/Sources/Compound/Buttons/SendButton.swift +++ b/Sources/Compound/Buttons/SendButton.swift @@ -15,9 +15,12 @@ public struct SendButton: View { /// The action to perform when the user triggers the button. public let action: () -> Void - private var iconColor: Color { isEnabled ? .compound.iconPrimary : .compound.iconQuaternary } + private var iconColor: Color { + guard isEnabled else { return .compound.iconQuaternary } + return colorScheme == .light ? .compound.iconOnSolidPrimary : .compound.iconPrimary + } + private var gradient: Gradient { isEnabled ? enabledGradient : .init(colors: [.clear]) } - private var colorSchemeOverride: ColorScheme { isEnabled ? .dark : colorScheme } /// This is a custom gradient used for this button, the colours don't come from our core tokens /// and aren't reactive to light/dark mode or high contrast, so it is hard coded in here. @@ -39,7 +42,6 @@ public struct SendButton: View { .foregroundStyle(iconColor) .scaledPadding(6, relativeTo: .compound.headingLG) .background { buttonShape } - .environment(\.colorScheme, colorSchemeOverride) .compositingGroup() } } diff --git a/Tests/CompoundTests/__Snapshots__ b/Tests/CompoundTests/__Snapshots__ index 24eee0c..dc261dd 160000 --- a/Tests/CompoundTests/__Snapshots__ +++ b/Tests/CompoundTests/__Snapshots__ @@ -1 +1 @@ -Subproject commit 24eee0c6a9348ad04f298d44d73d1d2a33ae6eba +Subproject commit dc261ddcae2ad2cb17d052145078f5d57dda0819