Skip to content

Commit

Permalink
Tests Removal + Redeclare RadixButton
Browse files Browse the repository at this point in the history
  • Loading branch information
amirsaam committed Oct 20, 2024
1 parent 42bd7a8 commit de36364
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 16 deletions.
5 changes: 1 addition & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ let package = Package(
.process("RadixColors/RadixColors.xcassets"),
.process("RadixIcons/RadixIcons.xcassets")
]
),
.testTarget(
name: "RadixUI-Tests",
dependencies: ["RadixUI"]),
)
]
)
23 changes: 23 additions & 0 deletions Sources/RadixUI/RadixPrimitives/RadixButton.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//
// RadixButton.swift
// RadixUI
//
// Created by Amir Mohammadi on 7/29/1403 AP.
//

import SwiftUI

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

public extension Button {
func radixButton() -> some View {
self.buttonStyle(RadixButton())
}
}
12 changes: 0 additions & 12 deletions Tests/RadixUI-Tests/RadixUI_Tests.swift

This file was deleted.

0 comments on commit de36364

Please sign in to comment.