import React from 'react'; import { WithStyles } from './CoinflowWebView'; import { CoinflowPurchaseProps, WithGeo } from './common'; export type CoinflowPayPalButtonProps = CoinflowPurchaseProps & WithStyles & WithGeo & { /** Email tied to the PayPal account, used to create the order. */ email?: string; /** Phone number tied to the PayPal account, used to create the order. */ phoneNumber?: { countryCode: string; nationalNumber: string; }; /** Saved PayPal account token, used to create the order directly. */ token?: string; /** * Fires once the PayPal purchase is approved/complete, with the resulting * payment. Unlike the hosted purchase flow, the standalone button does not * render its own "purchase complete" screen — use this to drive your own * post-purchase UI. */ onApprove?: (info: { paymentId: string; }) => void; /** Fires if the PayPal purchase fails, with the error message. */ onError?: (error: string) => void; /** Called once the button has loaded. */ onLoad?: () => void; /** * Screen insets the approval overlay should respect when it expands. The * overlay fills from `top` (e.g. the top safe-area inset) down to * `screenHeight - bottom` (e.g. the bottom tab-bar height), so it never * covers the status bar / notch or the host app's tab bar. Both default to * 0 (full screen). */ overlayInsets?: { top?: number; bottom?: number; }; }; /** * Standalone PayPal button for the React Native SDK. * * Renders the hosted `/paypal/:merchantId` button page inside a WebView and, * unlike {@link CoinflowPurchase}, shows only the PayPal button rather than the * full checkout. The identifier (email / phone / saved token) is passed as * query params so the page can create the order, and when PayPal's approval * modal opens the WebView expands to fill the screen. */ export declare function CoinflowPayPalButton(props: CoinflowPayPalButtonProps): React.JSX.Element;