Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
cassiocardoso committed Jan 17, 2017
1 parent 9fe0c71 commit 531ac12
Show file tree
Hide file tree
Showing 4 changed files with 227 additions and 2 deletions.
33 changes: 33 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Contributing to React Credit Cards
---

Hi! Thank you for your interest in participating in the React Credit Cards project. We're happy to have you here. No matter who you are or what your contributing background is, we want this to be a safe, fun place for you to help out.

**NOTE:** Please note that this project is released with a [Contributor Code of Conduct](code-of-conduct.md). By participating in this project you agree to abide by its terms.

## How do I set up for development?

Here's how you can get started developing locally:

$ git clone git@github.com:amarofashion/react-credit-cards.git
$ cd react-credit-cards
$ npm install
$ npm start

Now, if you go to localhost:3000 in your browser, you should see the demo page.

## How to contribute?

Here are the basic steps to get started contributing:

1. Fork then clone the repo and get development running on your computer. You can find instructions for setting up your development environment above.
2. Replicate the issue you're trying to fix or spec out the feature you're trying to add. Understanding the scope of what you're fixing or adding is important and upfront thought helps.
3. Change the code to fix the bug or add the feature. All changes should happen in the relevant `*.jsx` and `*.scss` files. All `*.js` files are automatically build.
4. Verify that your fix or feature works.
5. Run `npm run precommit` to lint all the files, run the tests and build the production files.
6. Commit your changes with an informative description.
7. Open a pull request to the primary repo with your new commits and a descriptive message about what the PR does.

## What can I contribute?

Check out the [issues](https://github.com/amarofashion/react-credit-cards/issues) for a comprehensive list of unfixed bugs and desired features.
7 changes: 7 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright 2017 AMARO

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
115 changes: 113 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,117 @@
# react-credit-cards
# React Credit Cards (rccs)
---

[? ADD LOGO HERE]

[![Travis](https://travis-ci.org/amarofashion/react-credit-cards.svg?branch=master)](https://travis-ci.org/amarofashion/react-credit-cards) [![Code Climate](https://codeclimate.com/github/amarofashion/react-credit-cards/badges/gpa.svg)](https://codeclimate.com/github/amarofashion/react-credit-cards)

Coming soon!
React Component to render a beautiful credit card on screen. It integrates with your payment form and updates card brand in real-time.

[ADD GIF HERE]

## Getting Started

To use `rccs` you'll need to install it locally in your project and import the component. There's no need to manually import the `.scss` as it will be done automatically.

### Install

Install `rccs` locally in your project:

npm install --save-dev react-credit-cards

### Usage

To use `rccs` you'll need to import it in your project:

```jsx
import Cards from 'react-credit-cards';
...

<Cards
number={paymentForm.props.number}
name={paymentForm.props.name}
expiry={paymentForm.props.expiry}
cvc={paymentForm.props.cvc}
focused={paymentForm.props.name}
/>
```

### Features

- We support all credit card brands used in [Payment](https://github.com/jessepollak/payment) and also Hipercard.

### Demo

## Options

You can change the initial options passing props to the component:

- `acceptedCards` {array}: Accepted credit card brands.
- `callback` {func}: A callback function.
- `name` {string}: Name on card.
- `number` {string|number}: Card number.
- `expiry` {string|number}: Card expiry date.
- `cvc` {string|number}: Card CVC/CVV.
- `focused` {string}: Focused field on card.
- `locale` {object}: Localization text on card (e.g. `valid: 'valid thru'`).
- `placeholders` {object}: Placeholder text on card (e.g. `name: 'YOUR NAME HERE'`).

## SCSS options

**Credit Card sizing**

- `$rccs-card-ratio`: Credit card ratio
- `$rccs-size`: Credit card width
- `$rccs-padding`: Padding around the card

**Credit Card fonts**

- `$rccs-name-font-size`: Name size.
- `$rccs-name-font-family`: Name family.
- `$rccs-number-font-size`: Number size.
- `$rccs-number-font-family`: Number family.
- `$rccs-valid-font-size`: Valid size.
- `$rccs-expiry-font-size`: Expiry size.
- `$rccs-expiry-font-family`: Expiry family.
- `$rccs-cvc-font-size`: CVC size.
- `$rccs-cvc-font-family`: CVC family.
- `$rccs-cvc-color`: CVC color.

**Credit Card styling**

- `$rccs-shadow`: Credit card shadow.
- `$rccs-light-text-color`: Light text color.
- `$rccs-dark-text-color`: Dark text color.
- `$rccs-stripe-bg-color`: Stripe background color on back.
- `$rccs-signature-background`: Sginature space background.
- `$rccs-default-background`: Default card background.
- `$rccs-unknown-background`: Unknown card background.
- `$rccs-background-transition`: Card background transition.
- `$rccs-animate-background`: Card background animation (boolean).

**Credit Card brands**

- `$rccs-amex-background`: Amex card background;

**NOTE:** Syntax is the same for every available issuer.

## Development

Here's how you can get started developing locally:

$ git clone git@github.com:amarofashion/react-credit-cards.git
$ cd react-credit-cards
$ npm install
$ npm start

Now, if you go to `http://localhost:3000` in your browser, you should see the demo page.

## Contributing

Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process of contributing to the project.

## LICENSE

This project is licensed under the [MIT License](LICENSE.md).

###### Made with :heart: at [AMARO](https://amaro.com).
74 changes: 74 additions & 0 deletions code-of-conduct.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [it@amaro.com](it@amaro.com). All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

0 comments on commit 531ac12

Please sign in to comment.