Credit Card Icons
A React component library for displaying credit card icons.
Features
- Lightweight and easy to use.
- Includes icons for major credit card providers.
- Customizable size and style.
Installation
To install the Credit Card Icons package, run the following command in your project directory:
npm install credit-card-icons
or if you use Yarn:
yarn add credit-card-icons
Usage
Here's a quick example to get you started:
import React from "react";
import { CardIcon } from "credit-card-icons";
function App() {
return (
<div>
<CardIcon brand="visa" />
<CardIcon brand="mastercard" />
{/* Add more icons as needed */}
</div>
);
}
export default App;
Props
-
brand
: The brand of the credit card. Supported values:visa
,mastercard
, etc. - Additional props to customize the icons will be documented here.
Building From Source
If you wish to build the package from the source, follow these steps:
- Clone the repository:
git clone https://github.com/typeWolffo/credit-card-icons.git
- Install dependencies:
npm install
- Run the build script:
npm run build
This will generate the necessary build artifacts in the dist
directory.
Contributing
We welcome contributions to the Credit Card Icons project! Please refer to our Contributing Guidelines for more information on how to contribute.
License
This project is licensed under the MIT License.