react-ir-banks-logo
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

react-ir-banks-logo

Version

A React component that returns logos of Iranian banks based on card number. Demo

Installation

npm i react-ir-banks-logo

Example

import { BankIcon } from 'react-ir-banks-logo';

function App() {
  const [digits, setDigits] = useState('');
  const [name, setName] = useState('');
  return (
    <div className="App">
      <input
        type="text"
        value={digits}
        onChange={e => setDigits(e.target.value)}
      />
      <BankIcon
        digits={digits}
        size="200px"
        margin="100px"
        onFindBankName={(name: string) => setName(name)}
      />
      <h1>{name}</h1>
    </div>
  );
}

Props

Props Value Type Default Value
digits string | number is required
size string '40px'
margin string '8px'
onFindBankName (name: string) => void -

Package Sidebar

Install

npm i react-ir-banks-logo

Weekly Downloads

15

Version

1.0.3

License

MIT

Unpacked Size

3.93 MB

Total Files

17

Last publish

Collaborators

  • ehsan_shv