From ffcca33ad8ce2653cca98cd7a2f3c0cdd7b71598 Mon Sep 17 00:00:00 2001 From: Amy Date: Thu, 22 Jun 2023 11:58:38 -0700 Subject: [PATCH] fixed capsule broder radius --- .DS_Store | Bin 0 -> 6148 bytes .../xcschemes/NiceComponents.xcscheme | 80 ++++++++++++++++++ NiceComponentsExample/.DS_Store | Bin 0 -> 6148 bytes .../xcshareddata/swiftpm/Package.resolved | 4 +- .../View/NiceButtonExampleView.swift | 12 ++- Package.resolved | 4 +- Package.swift | 2 +- .../NiceComponents/Button/NiceButton.swift | 2 +- 8 files changed, 97 insertions(+), 7 deletions(-) create mode 100644 .DS_Store create mode 100644 .swiftpm/xcode/xcshareddata/xcschemes/NiceComponents.xcscheme create mode 100644 NiceComponentsExample/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..7225434880da2aaeec13525d28bc443066cf53d9 GIT binary patch literal 6148 zcmeHKU5^qm6usR=8N`i5-DF=(Ch?UZ`;mB8MK+2^~>krMGD?3K#|cHwF0Hy-pQ+M2B>Y@AlXCdrqC27qne3aM6c1 zh(n~pcWEdQ-30H1s^Bz%50P{I7%k6GYG4mo_3?Sh#|_PC&?(iZ3}yq!Gf7~JJ4@^| zcAFYJIAGMtiO*MjTivezdMwKey58ruU_>1PB1A4Bfk?$Ze2aFGFGOU+nP>y z4)*i*?)~jq-ku)p6!Z4p?*43+u{Q7CdvMx3^UnR?1KtiMa1u!4$XYaBjX%(CTp#*g z;In4zF-K3KYn#rH_po9G8X^y|0v?S~N{ZD_3$ePf!VhVJb$m-ve3ghJbdi}wRPb11 z^zMR_93>o?i>wUd*})f6r6<6oSY|yI8EHgtKqHLB5gNv4B{&Kfd!u?`(<^0VFYL)U zFbWt2E}H_pKiEi&C5>~1a_c}QuK>Ulnx&!4zY5H;HI_8a72*j@C@N4 z`;|1#6)HLjefbc2WT9^;LXHmqw(L%#q|oF>0i!@%fpt~Q@%iuk{{9~)nVM0+C~&D1 z5UFatTE;8svvuX=_^h>&-XO7Yzqvw5L8gymS>U613rQND*<1jYG|m;G1!jH(qzooA J3j9+AegKn0`W*lO literal 0 HcmV?d00001 diff --git a/.swiftpm/xcode/xcshareddata/xcschemes/NiceComponents.xcscheme b/.swiftpm/xcode/xcshareddata/xcschemes/NiceComponents.xcscheme new file mode 100644 index 0000000..e19aab7 --- /dev/null +++ b/.swiftpm/xcode/xcshareddata/xcschemes/NiceComponents.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NiceComponentsExample/.DS_Store b/NiceComponentsExample/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..977165fe7d20018241f631dbb4fd1023df487b06 GIT binary patch literal 6148 zcmeHK&2G~`5T0!Vb*PYXXr=F?FbifJ$Zprn zw{!C8bmR5Sul)5aoHhCjS@YxB(SN~fE~S|7+F4)9(b+*+1}p=MFu?nR3uW{SRvOjT z0i&(}z#6KRz~>(Wj&Tio1}lwdfe0N6)S<#$F@z3By=(e;1}lv^oP@c22=ioNZYV-M z9r<0=orI^+TFZcC;35O7y4c|J|M2(s|BFGkWErpwEENNy*7ds`49T3WbA#iv)`h-; qvT(mjqY8mB$FXwwDBgl9L7U4C&@)(RL=D9L2q+q?u?+lE27UmKUB%Y` literal 0 HcmV?d00001 diff --git a/NiceComponentsExample/NiceComponentsExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/NiceComponentsExample/NiceComponentsExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 411498b..4640919 100644 --- a/NiceComponentsExample/NiceComponentsExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/NiceComponentsExample/NiceComponentsExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -6,8 +6,8 @@ "repositoryURL": "https://github.com/onevcat/Kingfisher.git", "state": { "branch": null, - "revision": "2235a22ca249199cb736237f4bb9cc12b6ed416a", - "version": "7.3.0" + "revision": "c1f60c63f356d364f4284ba82961acbe7de79bcc", + "version": "7.8.1" } } ] diff --git a/NiceComponentsExample/NiceComponentsExample/View/NiceButtonExampleView.swift b/NiceComponentsExample/NiceComponentsExample/View/NiceButtonExampleView.swift index 64fb60a..3f64e93 100644 --- a/NiceComponentsExample/NiceComponentsExample/View/NiceButtonExampleView.swift +++ b/NiceComponentsExample/NiceComponentsExample/View/NiceButtonExampleView.swift @@ -28,7 +28,7 @@ struct NiceButtonExampleView: View { PrimaryButton( "Like Button", - surfaceColor: .white, + surfaceColor: .orange, border: .rounded( color: .black, cornerRadius: 4, @@ -38,6 +38,16 @@ struct NiceButtonExampleView: View { NiceImage(systemIcon: "heart.fill", width: 14, height: 14, tintColor: .red) ) + PrimaryButton( + "Capsule Button", + border: .capsule( + color: .black, + width: 1.5 + ) + ) { }.withRightImage( + NiceImage(systemIcon: "heart.fill", width: 14, height: 14, tintColor: .red) + ) + SecondaryButton("Left Image Button") { }.withLeftImage( NiceImage(systemIcon: "pencil", width: 14, height: 14, tintColor: .black) ) diff --git a/Package.resolved b/Package.resolved index 2a760a7..4640919 100644 --- a/Package.resolved +++ b/Package.resolved @@ -6,8 +6,8 @@ "repositoryURL": "https://github.com/onevcat/Kingfisher.git", "state": { "branch": null, - "revision": "44e891bdb61426a95e31492a67c7c0dfad1f87c5", - "version": "7.4.1" + "revision": "c1f60c63f356d364f4284ba82961acbe7de79bcc", + "version": "7.8.1" } } ] diff --git a/Package.swift b/Package.swift index 68dee0b..53015ef 100644 --- a/Package.swift +++ b/Package.swift @@ -15,7 +15,7 @@ let package = Package( dependencies: [ .package( url: "https://github.com/onevcat/Kingfisher.git", - from: "7.2.0" + from: "7.6.1" ) ], targets: [ diff --git a/Sources/NiceComponents/Button/NiceButton.swift b/Sources/NiceComponents/Button/NiceButton.swift index 6bef25d..97c3a56 100644 --- a/Sources/NiceComponents/Button/NiceButton.swift +++ b/Sources/NiceComponents/Button/NiceButton.swift @@ -141,7 +141,7 @@ extension NiceButton { .frame(height: style.height) .fixedSize(horizontal: false, vertical: true) .background(inactive ? style.inactiveSurfaceColor : style.surfaceColor) - .cornerRadius(style.border.cornerRadius) + .cornerRadius(cornerRadius) .overlay( borderOverlay )