mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 19:07:08 +00:00
export Focused type to make available externally
This commit is contained in:
parent
8c84ef5285
commit
cc046b2941
18
types/react-credit-cards/index.d.ts
vendored
18
types/react-credit-cards/index.d.ts
vendored
@ -1,6 +1,6 @@
|
||||
// Type definitions for react-credit-cards 0.7
|
||||
// Project: https://github.com/amarofashion/react-credit-cards
|
||||
// Definitions by: Vytautas Strimaitis <https://github.com/vstrimaitis>
|
||||
// Definitions by: Vytautas Strimaitis <https://github.com/vstrimaitis>, Ole Frank <https://github.com/olefrank>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
@ -8,24 +8,28 @@ import * as React from "react";
|
||||
|
||||
export interface CallbackArgument {
|
||||
isValid: boolean;
|
||||
type: { issuer: string; maxLength: number; };
|
||||
type: { issuer: string; maxLength: number };
|
||||
}
|
||||
|
||||
export type Focused = "name" | "number" | "expiry" | "cvc";
|
||||
|
||||
export interface ReactCreditCardProps {
|
||||
acceptedCards?: ReadonlyArray<string>;
|
||||
callback?: (type: CallbackArgument, isValid: boolean) => void;
|
||||
cvc: string | number;
|
||||
expiry: string | number;
|
||||
focused?: "name" | "number" | "expiry" | "cvc";
|
||||
focused?: Focused;
|
||||
issuer?: string;
|
||||
locale?: { valid: string; };
|
||||
locale?: { valid: string };
|
||||
name: string;
|
||||
number: string | number;
|
||||
placeholders?: { name: string; };
|
||||
placeholders?: { name: string };
|
||||
preview?: boolean;
|
||||
}
|
||||
|
||||
declare class ReactCreditCard extends React.Component<ReactCreditCardProps, never> {
|
||||
}
|
||||
declare class ReactCreditCard extends React.Component<
|
||||
ReactCreditCardProps,
|
||||
never
|
||||
> {}
|
||||
|
||||
export default ReactCreditCard;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user