UNPKG

react-card-brand

Version:

> A zero-dependency React Hook to show and get the brand from a card type.

25 lines (24 loc) 714 B
import * as React from 'react'; interface UseCardBrandProps { images?: { [key: string]: React.ReactNode | JSX.Element; }; type?: string; ariaLabel?: string; } export default function useCardBrand(): { getSvgProps: (props?: UseCardBrandProps) => { images?: { [key: string]: React.ReactNode | JSX.Element; } | undefined; type?: string | undefined; ariaLabel?: string | undefined; 'aria-label': string; children: string | number | true | Iterable<React.ReactNode> | JSX.Element | null; width: string; height: string; viewBox: string; }; getCardBrand: (cardNumber: string) => string; }; export {};