Conversation
|
Morning @lusarz, Thank you for the contribution! Also apologies I didn't reply on #443, your request hasn't gone unnoticed and I made a start on trying to implement this a few weeks ago but forgot to tag the issue properly https://github.com/Shopify/checkout-sheet-kit-swift/pull/460/changes but haven't got it working just yet. Our approach is to implement first in the native SDK (Checkout Sheet Kit Swift in this case), and then bridge the API's in the React Native layer to avoid duplicating the logic in both sides. I don't think we'll be able to merge this PR as it stands until we're able to get support landed in Swift |
|
Morning @kieran-osgood-shopify Thanks for the context! That makes total sense — happy to align with the approach of landing it in the Swift SDK first. Once Shopify/checkout-sheet-kit-swift#460 is merged, I can update this PR to use the SDK's native modifier in Happy to rebase and update whenever the Swift side is ready, or feel free to close this if you'd prefer to handle the RN bridge internally. |
|
It'll probably make sense to just start a fresh PR so I'll close this one out Hope to get this reviewed soon - so stay tuned 🙏🏼 |
What changes are you making?
Adds a new
applePayStyleprop toAcceleratedCheckoutButtonsthat allows customizing the Apple Pay button appearance. This addresses #443 where consumers couldn't control the button style — for example, getting a white button when a black one was needed for their app's UI.The prop maps to Apple's
PayWithApplePayButtonStyleand supports four values:automatic,black,white, andwhiteOutline. Defaults toautomatic(adapts to the system light/dark mode).Integration guide
<AcceleratedCheckoutButtons applePayLabel={ApplePayLabel.checkout} + applePayStyle={ApplePayStyle.black} cartId={cartId} wallets={[ AcceleratedCheckoutWallet.applePay, AcceleratedCheckoutWallet.shopPay, ]} cornerRadius={cornerRadius} />Manual Testing
applePayStyle={ApplePayStyle.black}renders a black Apple Pay buttonapplePayStyle={ApplePayStyle.white}renders a white Apple Pay buttonapplePayStyle={ApplePayStyle.whiteOutline}renders a white button with outlineapplePayStyle={ApplePayStyle.automatic}adapts to system color schemeapplePayStyledefaults toautomaticbehaviorapplePayLabel,cornerRadius,wallets) continue to work alongsideapplePayStylePR Checklist
Important
Releasing a new version of the kit?
package.jsonfile.Tip
See the Contributing documentation for instructions on how to publish a new version of the library.