Skip to content

[AC][ApplePay]: add .applePayStyle() modifier to configure styling on ApplePay#551

Draft
kieran-osgood-shopify wants to merge 3 commits intomainfrom
issue-569-add-color-modifier
Draft

[AC][ApplePay]: add .applePayStyle() modifier to configure styling on ApplePay#551
kieran-osgood-shopify wants to merge 3 commits intomainfrom
issue-569-add-color-modifier

Conversation

@kieran-osgood-shopify
Copy link
Copy Markdown
Contributor

@kieran-osgood-shopify kieran-osgood-shopify commented Apr 2, 2026

What changes are you making?

Related: Shopify/checkout-sheet-kit-react-native#443

TLDR

Apple Pay Button was using the .automatic style (black on light mode, white on dark mode)

This PR introduces a swiftui modifier for configuring the style to either

  • .automatic
  • .white
  • .black
  • .whiteOutline
image

Whats changes

  • Added sample app settings for configuring the style of the button for the app so that testers can see each of the different styles.
image
  • Default button style remains

How

One thing that I had to refactor was the Apple Pay button from Passkit.
The SwiftUI PayWithApplePayButton we were using was proving problematic
I'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?

Releasing a new major version?

  • I have bumped the version number in the README.

Tip

See the Contributing documentation for instructions on how to publish a new version of the library.

@kieran-osgood-shopify kieran-osgood-shopify requested a review from a team as a code owner April 2, 2026 13:22
@kieran-osgood-shopify kieran-osgood-shopify marked this pull request as draft April 2, 2026 13:22
@kieran-osgood-shopify kieran-osgood-shopify changed the title Issue 569 add color modifier [AC][ApplePay]: add .applePayStyle() modifier to configure styling on ApplePay Apr 2, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant