[AC][ApplePay]: add .applePayStyle() modifier to configure styling on ApplePay#551
Draft
kieran-osgood-shopify wants to merge 3 commits intomainfrom
Draft
[AC][ApplePay]: add .applePayStyle() modifier to configure styling on ApplePay#551kieran-osgood-shopify wants to merge 3 commits intomainfrom
kieran-osgood-shopify wants to merge 3 commits intomainfrom
Conversation
…port Replace SwiftUI PayWithApplePayButton with UIKit PKPaymentButton wrapped in UIViewRepresentable. This fixes border rendering issues with whiteOutline style at constrained frame heights, as PKPaymentButton allows setting style and cornerRadius directly at init time. Also aligns applePayStyle with modifier-only API pattern (removes init overload) for consistency with applePayLabel, cornerRadius, and wallets. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bef9f76 to
5d5757f
Compare
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes are you making?
Related: Shopify/checkout-sheet-kit-react-native#443
TLDR
Apple Pay Button was using the
.automaticstyle (black on light mode, white on dark mode)This PR introduces a swiftui modifier for configuring the style to either
.automatic.white.black.whiteOutlineWhats changes
How
One thing that I had to refactor was the Apple Pay button from Passkit.
The SwiftUI
PayWithApplePayButtonwe were using was proving problematicI've also made the Apple pay button a UI representable now instead This is to work around the SwiftUI limitation on the white outline button where it would render incorrectly.
Before you merge
Important
Releasing a new version of the kit?
podspecfile.Releasing a new major version?
Tip
See the Contributing documentation for instructions on how to publish a new version of the library.