npm.io
0.8.4 • Published 2 years ago

@types/react-credit-cards

Licence
MIT
Version
0.8.4
Deps
1
Size
5 kB
Vulns
0
Weekly
0

Installation

npm install --save @types/react-credit-cards

Summary

This package contains type definitions for react-credit-cards (https://github.com/amarofashion/react-credit-cards).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-credit-cards.

index.d.ts

import * as React from "react";

export interface CallbackArgument {
    issuer: string;
    maxLength: number;
}

export type Focused = "name" | "number" | "expiry" | "cvc";

export interface ReactCreditCardProps {
    acceptedCards?: readonly string[] | undefined;
    callback?: ((type: CallbackArgument, isValid: boolean) => void) | undefined;
    cvc: string | number;
    expiry: string | number;
    focused?: Focused | undefined;
    issuer?: string | undefined;
    locale?: { valid: string } | undefined;
    name: string;
    number: string | number;
    placeholders?: { name: string } | undefined;
    preview?: boolean | undefined;
}

declare class ReactCreditCard extends React.Component<
    ReactCreditCardProps,
    never
> {}

export default ReactCreditCard;

Additional Details

  • Last updated: Mon, 20 Nov 2023 2324 GMT
  • Dependencies: @types/react

Credits

These definitions were written by Vytautas Strimaitis, Ole Frank, and zzanol.