@blocklet/payment-react
Version:
Reusable react components for payment kit v2
23 lines (22 loc) • 809 B
TypeScript
interface PromotionInputProps {
promotion: {
applied: boolean;
code: string | null;
active: boolean;
inactiveReason: string | null;
apply: (code: string) => Promise<{
success: boolean;
error?: string;
}>;
remove: () => Promise<void>;
};
discounts: any[];
discountAmount: string | null;
currency?: any;
/** Start with input field visible (skip the "Add promotion code" button) */
initialShowInput?: boolean;
/** Show skeleton for the discount amount while switching */
isAmountLoading?: boolean;
}
export default function PromotionInput({ promotion, discounts, discountAmount, currency, initialShowInput, isAmountLoading, }: PromotionInputProps): import("react").JSX.Element | null;
export {};