PrimerCheckoutSheet shows. They are exported so you can show the same screens in your own layout, for example from the state of usePrimerCheckout.
Each screen fills the width of its parent and centers its content. Wrap a screen in your own
View to size and position it.
The props types are exported as PrimerLoadingScreenProps, PrimerSuccessScreenProps, PrimerErrorScreenProps and PrimerStatusScreenLayoutProps.
The status screens work inside and outside
PrimerCheckoutProvider. Inside it, they use your theme and settings.uiOptions.appearanceMode. Outside it, they use the default theme in the device’s color scheme. Their default text always follows the device locale, see usePrimerLocalization. The tables below show the English defaults.PrimerLoadingScreen
PrimerSuccessScreen
PrimerErrorScreen
PrimerStatusScreenLayout
Use it to build your own status screen that matches the others.Usage in a custom layout
Show a status screen from the checkout state. This example covers initialization, success, a pending payment and failure:onDone, for example one the parent wraps in useCallback, so the success timer does not restart.
To show your own result screens after
PrimerCheckoutSheet, set settings.uiOptions.isSuccessScreenEnabled or isErrorScreenEnabled to false. The sheet then skips that screen, clears paymentOutcome and calls onRequestDismiss, so keep the result yourself when it arrives. See PrimerSettings.See also
usePrimerCheckout
isReady, error and paymentOutcomeHandle the payment result
Route your UI on the payment result
Color tokens
The tokens the status screens use
usePrimerLocalization
Where the default text comes from