Skip to content

Commit c8c7442

Browse files
committed
Basic highlighted support with opacity change.
1 parent e21e21d commit c8c7442

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

WooCommerce/Classes/POS/Presentation/Reusable Views/Buttons/POSButtonStyle.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ struct POSButtonStyle: ButtonStyle {
4141
// Makes the entire area tappable, otherwise the area with clear background is not tappable.
4242
.contentShape(Rectangle())
4343
.cornerRadius(POSButtonStyleConstants.framedButtonCornerRadius)
44+
.opacity(configuration.isPressed ? 0.7 : 1.0)
45+
.animation(.easeOut(duration: 0.15), value: configuration.isPressed)
4446
}
4547

4648
private var backgroundColor: Color {

0 commit comments

Comments
 (0)