UNPKG

@blocklet/payment-react

Version:

Reusable react components for payment kit v2

39 lines (38 loc) 1.3 kB
import type { Invoice, PaymentCurrency, PaymentMethod, Subscription } from '@blocklet/payment-types'; type DialogProps = { open?: boolean; onClose?: () => void; title?: string; }; type DetailLinkOptions = { enabled?: boolean; onClick?: (e: React.MouseEvent) => void; title?: string; }; type Props = { subscriptionId?: string; customerId?: string; mode?: 'default' | 'custom'; onPaid?: (id: string, currencyId: string, type: 'subscription' | 'customer') => void; dialogProps?: DialogProps; detailLinkOptions?: DetailLinkOptions; successToast?: boolean; alertMessage?: string; children?: (handlePay: (item: SummaryItem) => void, data: { subscription?: Subscription; summary: { [key: string]: SummaryItem; }; invoices: Invoice[]; subscriptionCount?: number; detailUrl: string; }) => React.ReactNode; authToken?: string; }; type SummaryItem = { amount: string; currency: PaymentCurrency; method: PaymentMethod; }; declare function OverdueInvoicePayment({ subscriptionId, customerId, mode, dialogProps, children, onPaid, detailLinkOptions, successToast, alertMessage, authToken, }: Props): import("react").JSX.Element | null; export default OverdueInvoicePayment;