@@ -41,7 +41,7 @@ import type {
4141 CheckoutSubmitStart
4242} from '../events' ;
4343
44- export interface CheckoutProps {
44+ export interface ShopifyCheckoutProps {
4545 /**
4646 * The checkout URL to load in the webview
4747 */
@@ -104,14 +104,14 @@ export interface CheckoutProps {
104104 testID ?: string ;
105105}
106106
107- export interface CheckoutRef {
107+ export interface ShopifyCheckoutRef {
108108 /**
109109 * Reload the current checkout page
110110 */
111111 reload : ( ) => void ;
112112}
113113
114- interface NativeCheckoutWebViewProps {
114+ interface NativeShopifyCheckoutWebViewProps {
115115 checkoutUrl : string ;
116116 auth ?: string ;
117117 style ?: ViewStyle ;
@@ -126,7 +126,7 @@ interface NativeCheckoutWebViewProps {
126126}
127127
128128const RCTCheckoutWebView =
129- requireNativeComponent < NativeCheckoutWebViewProps > ( 'RCTCheckoutWebView' ) ;
129+ requireNativeComponent < NativeShopifyCheckoutWebViewProps > ( 'RCTCheckoutWebView' ) ;
130130
131131/**
132132 * Checkout provides a native webview component for displaying
@@ -137,29 +137,29 @@ const RCTCheckoutWebView =
137137 * including Shop Pay, Apple Pay, and other payment methods.
138138 *
139139 * @example Basic usage
140- * import {Checkout } from '@shopify/checkout-sheet-kit';
140+ * import {ShopifyCheckout } from '@shopify/checkout-sheet-kit';
141141 *
142- * <Checkout
142+ * <ShopifyCheckout
143143 * checkoutUrl="https://shop.example.com/checkouts/cn/123"
144144 * onComplete={(event) => console.log('Checkout completed!', event.orderDetails)}
145145 * onError={(error) => console.error('Checkout failed:', error.message)}
146146 * style={{flex: 1}}
147147 * />
148148 *
149149 * @example Passing an app authentication token to customize checkout and receive richer events
150- * <Checkout
150+ * <ShopifyCheckout
151151 * checkoutUrl="https://shop.example.com/checkouts/cn/123"
152152 * auth="your_auth_token_here"
153153 * onComplete={(event) => console.log('Checkout completed!')}
154154 * />
155155 *
156156 * @example Using with ref to reload on error
157157 * import {useRef} from 'react';
158- * import {Checkout , CheckoutHandle} from '@shopify/checkout-sheet-kit';
158+ * import {ShopifyCheckout , CheckoutHandle} from '@shopify/checkout-sheet-kit';
159159 *
160- * const checkoutRef = useRef<CheckoutHandle >(null);
160+ * const checkoutRef = useRef<ShopifyCheckoutHandle >(null);
161161 *
162- * <Checkout
162+ * <ShopifyCheckout
163163 * ref={checkoutRef}
164164 * checkoutUrl={url}
165165 * auth={authToken}
@@ -169,7 +169,7 @@ const RCTCheckoutWebView =
169169 * }}
170170 * />
171171 */
172- export const Checkout = forwardRef < CheckoutRef , CheckoutProps > (
172+ export const ShopifyCheckout = forwardRef < ShopifyCheckoutRef , ShopifyCheckoutProps > (
173173 (
174174 {
175175 checkoutUrl,
@@ -201,7 +201,7 @@ export const Checkout = forwardRef<CheckoutRef, CheckoutProps>(
201201
202202
203203 const handleStart = useCallback <
204- Required < NativeCheckoutWebViewProps > [ 'onStart' ]
204+ Required < NativeShopifyCheckoutWebViewProps > [ 'onStart' ]
205205 > (
206206 ( event : { nativeEvent : CheckoutStartEvent } ) => {
207207 onStart ?.( event . nativeEvent ) ;
@@ -210,7 +210,7 @@ export const Checkout = forwardRef<CheckoutRef, CheckoutProps>(
210210 ) ;
211211
212212 const handleError = useCallback <
213- Required < NativeCheckoutWebViewProps > [ 'onError' ]
213+ Required < NativeShopifyCheckoutWebViewProps > [ 'onError' ]
214214 > (
215215 ( event : { nativeEvent : CheckoutException } ) => {
216216 onError ?.( event . nativeEvent ) ;
@@ -219,7 +219,7 @@ export const Checkout = forwardRef<CheckoutRef, CheckoutProps>(
219219 ) ;
220220
221221 const handleComplete = useCallback <
222- Required < NativeCheckoutWebViewProps > [ 'onComplete' ]
222+ Required < NativeShopifyCheckoutWebViewProps > [ 'onComplete' ]
223223 > (
224224 ( event : { nativeEvent : CheckoutCompleteEvent } ) => {
225225 onComplete ?.( event . nativeEvent ) ;
@@ -228,13 +228,13 @@ export const Checkout = forwardRef<CheckoutRef, CheckoutProps>(
228228 ) ;
229229
230230 const handleCancel = useCallback <
231- Required < NativeCheckoutWebViewProps > [ 'onCancel' ]
231+ Required < NativeShopifyCheckoutWebViewProps > [ 'onCancel' ]
232232 > ( ( ) => {
233233 onCancel ?.( ) ;
234234 } , [ onCancel ] ) ;
235235
236236 const handleLinkClick = useCallback <
237- Required < NativeCheckoutWebViewProps > [ 'onLinkClick' ]
237+ Required < NativeShopifyCheckoutWebViewProps > [ 'onLinkClick' ]
238238 > (
239239 ( event : { nativeEvent : { url : string } } ) => {
240240 if ( ! event . nativeEvent . url ) return ;
@@ -244,7 +244,7 @@ export const Checkout = forwardRef<CheckoutRef, CheckoutProps>(
244244 ) ;
245245
246246 const handleAddressChangeStart = useCallback <
247- Required < NativeCheckoutWebViewProps > [ 'onAddressChangeStart' ]
247+ Required < NativeShopifyCheckoutWebViewProps > [ 'onAddressChangeStart' ]
248248 > (
249249 ( event : { nativeEvent : CheckoutAddressChangeStart } ) => {
250250 if ( ! event . nativeEvent ) return ;
@@ -254,7 +254,7 @@ export const Checkout = forwardRef<CheckoutRef, CheckoutProps>(
254254 ) ;
255255
256256 const handleSubmitStart = useCallback <
257- Required < NativeCheckoutWebViewProps > [ 'onSubmitStart' ]
257+ Required < NativeShopifyCheckoutWebViewProps > [ 'onSubmitStart' ]
258258 > (
259259 ( event : { nativeEvent : CheckoutSubmitStart } ) => {
260260 if ( ! event . nativeEvent ) return ;
@@ -303,6 +303,6 @@ export const Checkout = forwardRef<CheckoutRef, CheckoutProps>(
303303 } ,
304304) ;
305305
306- Checkout . displayName = 'Checkout' ;
306+ ShopifyCheckout . displayName = 'Checkout' ;
307307
308- export default Checkout ;
308+ export default ShopifyCheckout ;
0 commit comments