diff --git a/compound-ios/Sources/Compound/BaseStyles/CompoundButtonStyle.swift b/compound-ios/Sources/Compound/BaseStyles/CompoundButtonStyle.swift index 5b41a1da6..a186c7c72 100644 --- a/compound-ios/Sources/Compound/BaseStyles/CompoundButtonStyle.swift +++ b/compound-ios/Sources/Compound/BaseStyles/CompoundButtonStyle.swift @@ -22,6 +22,7 @@ public struct CompoundButtonStyle: ButtonStyle { @Environment(\.isEnabled) private var isEnabled @Environment(\.colorScheme) private var colorScheme @Environment(\.accessibilityShowButtonShapes) private var accessibilityShowButtonShapes + @Environment(\.isFocused) private var isFocused var kind: Kind public enum Kind { @@ -117,6 +118,11 @@ public struct CompoundButtonStyle: ButtonStyle { makeBackground(configuration: configuration) } .contentShape(contentShape) + .overlay { + if isFocused { + contentShape.stroke(.compound.borderInteractivePrimary, lineWidth: 2) + } + } } @ViewBuilder