Skip to content

Commit

Permalink
Update Mastercard gradient
Browse files Browse the repository at this point in the history
  • Loading branch information
cassiocardoso authored and gilbarbara committed Dec 17, 2018
1 parent db82835 commit 3ccddd8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
React Credit Cards
===
# React Credit Cards

[![NPM](https://badge.fury.io/js/react-credit-cards.svg)](https://www.npmjs.com/package/react-credit-cards)
[![Travis](https://travis-ci.org/amarofashion/react-credit-cards.svg?branch=master)](https://travis-ci.org/amarofashion/react-credit-cards)
Expand All @@ -13,6 +12,7 @@ A modern credit card component for React.
[Demo](https://amarofashion.github.io/react-credit-cards/)

### Install

```
npm install --save react-credit-cards
```
Expand Down Expand Up @@ -42,10 +42,10 @@ Or you can import the CSS:

## Props

- `name` {string}: Name on card. *
- `number` {string|number}: Card number. *
- `expiry` {string|number}: Card expiry date. `10/20` or `012017` *
- `cvc` {string|number}: Card CVC/CVV. *
- `name` {string}: Name on card. \*
- `number` {string|number}: Card number. \*
- `expiry` {string|number}: Card expiry date. `10/20` or `012017` \*
- `cvc` {string|number}: Card CVC/CVV. \*
- `focused` {string}: Focused card field. `name|number|expiry|cvc`
- `locale` {object}: Localization text (e.g. `{ valid: 'valid thru' }`).
- `placeholders` {object}: Placeholder text (e.g. `{ name: 'YOUR NAME HERE' }`).
Expand All @@ -54,8 +54,7 @@ Or you can import the CSS:
- `acceptedCards` {array}: If you want to limit the accepted cards. (e.g. `['visa', 'mastercard']`
- `callback` {func}: A callback function that will be called when the card number has changed with 2 paramaters: `type ({ issuer: 'visa', maxLength: 19 }), isValid ({boolean})`

\* *Required fields*

\* _Required fields_

## SCSS options

Expand Down Expand Up @@ -95,7 +94,7 @@ Or you can import the CSS:
- `$rccs-dankort-background`: Defaults to `linear-gradient(25deg, #ccc, #999)`
- `$rccs-dinersclub-background`: Defaults to `linear-gradient(25deg, #fff, #eee)`
- `$rccs-discover-background`: Defaults to `linear-gradient(25deg, #fff, #eee)`
- `$rccs-mastercard-background`: Defaults to `linear-gradient(25deg, #f37b26, #fdb731)`
- `$rccs-mastercard-background`: Defaults to `linear-gradient(25deg, #e8e9e5, #fbfbfb)`
- `$rccs-visa-background`: Defaults to `linear-gradient(25deg, #0f509e, #1399cd)`
- `$rccs-elo-background`: Defaults to `linear-gradient(25deg, #211c18, #aaa7a2)`
- `$rccs-hipercard-background`: Defaults to `linear-gradient(25deg, #8b181b, #de1f27)`
Expand All @@ -116,10 +115,11 @@ Now, if you go to `http://localhost:3000` in your browser, you should see the de
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process of contributing to the project.

## Useful links

[EBANK's test numbers](https://www.ebanx.com/business/en/developers/integrations/testing/credit-card-test-numbers)
[Adyen's test numbers](https://gist.github.com/j3j5/8b3e48ccad746b90a54a)
[Worldpay's test card numbers](https://support.worldpay.com/support/kb/bg/testandgolive/tgl5103.html)
[Brazilian cards patterns](https://github.com/erikhenrique/bin-cc/blob/master/README.md)
[Brazilian cards patterns](https://github.com/erikhenrique/bin-cc/blob/master/README.md)

## LICENSE

Expand Down
6 changes: 5 additions & 1 deletion src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ $rccs-amex-background: linear-gradient(25deg, #308c67, #a3f2cf) !default;
$rccs-dankort-background: linear-gradient(25deg, #ccc, #999) !default;
$rccs-dinersclub-background: linear-gradient(25deg, #fff, #eee) !default;
$rccs-discover-background: linear-gradient(25deg, #fff, #eee) !default;
$rccs-mastercard-background: linear-gradient(25deg, #f37b26, #fdb731) !default;
$rccs-mastercard-background: linear-gradient(25deg, #fbfbfb, #e8e9e5) !default;
$rccs-visa-background: linear-gradient(25deg, #0f509e, #1399cd) !default;
$rccs-elo-background: linear-gradient(25deg, #211c18, #aaa7a2) !default;
$rccs-hipercard-background: linear-gradient(25deg, #8b181b, #de1f27) !default;
Expand Down Expand Up @@ -245,6 +245,10 @@ $rccs-visaelectron-logo: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBl

&--maestro,
&--mastercard {
> div {
color: $rccs-dark-text-color;
}

.rccs__card__background {
background: $rccs-mastercard-background;
}
Expand Down

2 comments on commit 3ccddd8

@cobakais
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could I find valid credit cards?

@gilbarbara
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know. Could you?

Please sign in to comment.