UNPKG

@chainpay/component

Version:

A React-based payment component library that supports multiple payment channels and internationalization.

48 lines (40 loc) 1.16 kB
import { ChainPayLng } from "./type"; export type LngType = (typeof ChainPayLng)[keyof typeof ChainPayLng]; export interface ChainPayProps extends PayChannelProps { dark?: boolean; amount?: number; currency?: string; language?: LngType | keyof typeof ChainPayLng; countDown?: number; getSignInfoFn?: (data: object) => Promise<any>; onCountDownTimeout?: () => void; onBack?: (close: boolean) => void; onClose?: () => void; onSuccess?: () => void; onError?: (error: string) => void; onComputed?: () => void; } export type PayChannelProps = { appId?: string; testApi?: boolean; getChannelApiUrl?: string; iconAssetsPrefix?: string; }; export type PayChannelItem = { name: string; state: boolean; iconName: string; channelShowName: string; currency: string; currencys: any[]; }; declare module "@chainpay/component" { type FC<P = {}> = (props: P) => JSX.Element | null; const ChainPay: FC<ChainPayProps>; export default ChainPay; export { ChainPayLng }; export function useChainPay(options?: ChainPayProps): { showPayModal: (props: ChainPayProps) => void; closePayModal: () => void; }; }