Skip to content

Commit

Permalink
fix: animation
Browse files Browse the repository at this point in the history
  • Loading branch information
tsuzukihashi committed Apr 28, 2023
1 parent 7d133be commit d1647c2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/TsuzuKit/CapsuleButtonStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ public struct CapsuleButtonStyle: ButtonStyle {
.background(
Capsule()
.fill(backgroundColor)
.scaleEffect(configuration.isPressed ? 1.05 : 1)
)
.animation(.spring(response: 0.2, dampingFraction: 0.9), value: configuration.isPressed)
}
}

Expand Down

0 comments on commit d1647c2

Please sign in to comment.