@funkit/connect
Version:
Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.
37 lines (36 loc) • 1.57 kB
TypeScript
import type { TFunction } from 'i18next';
import React, { type ReactNode } from 'react';
import type { CheckoutProgressStep } from '~/providers/FunkitCheckoutContext';
interface TransactionStatusProps {
isLayerZero: boolean;
isWithdrawal: boolean;
textConfigStatus?: TextConfigStatus;
textConfigSteps?: TextConfigSteps;
onOrderDelayed?: () => void;
startTimeMs: number;
status: 'delayed' | 'failed' | 'progress' | 'success';
step: CheckoutProgressStep;
}
export type TextConfig = {
description: ReactNode;
descriptionKey: string;
title: string;
} | {
description: string;
descriptionKey?: never;
title: string;
};
export type TextConfigContext = {
durationUnits: string;
isWithdrawal: boolean;
finalizeVerb: string;
};
export type TextConfigStatus = Record<Exclude<TransactionStatusProps['status'], 'progress'> | 'progress_delayed', TextConfig | ((context: TextConfigContext) => TextConfig)>;
export declare const getDefaultTextConfigStatus: (t: TFunction) => TextConfigStatus;
export type TextConfigSteps = Record<CheckoutProgressStep, TextConfig | ((context: TextConfigContext) => TextConfig)>;
export declare const getDefaultTextConfigSteps: (t: TFunction) => TextConfigSteps;
export declare function TransactionStatusLoading({ expectedStatus, }: {
expectedStatus: TransactionStatusProps['status'];
}): React.JSX.Element;
export declare function TransactionStatus({ isLayerZero, isWithdrawal, status, step, textConfigStatus, textConfigSteps, }: TransactionStatusProps): React.JSX.Element;
export {};