Skip to content

Commit

Permalink
Update RadixButton.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
amirsaam committed Oct 20, 2024
1 parent f687df0 commit a0421ef
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions Sources/RadixUI/RadixThemes/RadixButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,11 @@

import SwiftUI

fileprivate struct RadixButton: ButtonStyle {
public struct RadixButton: ButtonStyle {
func makeBody(configuration: Self.Configuration) -> some View {
configuration.label
.scaleEffect(configuration.isPressed ? 0.97 : 1)
.opacity(configuration.isPressed ? 0.8 : 1)
.animation(.easeInOut(duration: 0.1), value: configuration.isPressed)
}
}

extension Button where Label == AnyView {
public func radixButton() -> some View {
self.buttonStyle(RadixButton())
}
}

0 comments on commit a0421ef

Please sign in to comment.