A React component that returns logos of Iranian banks based on card number. Demo
npm i react-ir-banks-logo
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 | Value Type | Default Value |
---|---|---|
digits | string | number |
is required |
size | string |
'40px' |
margin | string |
'8px' |
onFindBankName | (name: string) => void |
- |