Skip to content

Commit

Permalink
move to react 0.14.7
Browse files Browse the repository at this point in the history
replace dot char with String.fromCharCode to fix encoding issues
  • Loading branch information
Shay Stern committed Feb 13, 2016
1 parent e8317a3 commit 4c830bc
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = (grunt) ->
"clean:build"
]

@registerTask "default", [
@registerTask "dev", [
"clean"
"cjsx"
"browserify:dev"
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ card-react is a React component that aims to do the same for React.

![card](http://i.imgur.com/qG3TenO.gif)

### From version 1.1.20 card-react supports React 0.14.7 and up

### Features

- Validate inputs
Expand Down Expand Up @@ -92,8 +94,8 @@ Once included, you can initialize the component. you'll need to make the compone

#### Development

- Run npm install
- Run grunt
- npm install
- grunt dev
- Navigate to http://localhost:8000/
- Run grunt build after you make the changes

Expand Down
19 changes: 11 additions & 8 deletions lib/card-react-component.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
(function() {
var ClassNames, Payment, React, ReactCard;
var dot,ccDots,cvcDots,expiryDots;
dot = String.fromCharCode(183);
ccDots = dot + dot + dot + dot;
cvcDots = dot + dot + dot;
expiryDots = dot + dot + "/" + dot + dot;
var ClassNames, Payment, React, ReactCard, ccDots, cvcDots, dot, expiryDots;

React = require('react');

Payment = require('payment');

ClassNames = require('classnames');

dot = String.fromCharCode('8226');

ccDots = dot + dot + dot + dot;

cvcDots = dot + dot + dot;

expiryDots = dot + dot + '/' + dot + dot;

ReactCard = React.createClass({
displayName: "ReactCard",
getDefaultProps: function() {
Expand All @@ -22,9 +25,9 @@
},
baseWidth: 350,
defaultValues: {
number:ccDots + " " + ccDots + " " + ccDots + " " + ccDots,
number: ccDots + " " + ccDots + " " + ccDots + " " + ccDots,
cvc: cvcDots,
expiry:expiryDots,
expiry: expiryDots,
name: 'Full Name'
}
};
Expand Down
2 changes: 1 addition & 1 deletion lib/card-react-form-container.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"name": "card-react",
"version": "1.0.20",
"version": "1.1.20",
"description": "Add an interactive credit card animation to your payment form.",
"main": "lib/card-react-form-container.js",
"dependencies": {
"classnames": "^2.1.2",
"payment": "0.0.12",
"classnames": "^2.1.2"
"react": "^0.14.7",
"react-dom": "^0.14.7"
},
"devDependencies": {
"bourbon": "^4.2.3",
Expand All @@ -24,7 +26,6 @@
"grunt-contrib-sass": "^0.9.2",
"grunt-contrib-uglify": "^0.9.1",
"grunt-contrib-watch": "^0.6.1",
"react": "^0.13.3",
"uglify-save-license": "^0.4.1"
},
"scripts": {
Expand Down
11 changes: 8 additions & 3 deletions src/components/card-react-component.cjsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ React = require 'react'
Payment = require 'payment'
ClassNames = require 'classnames'

dot = String.fromCharCode('8226')
ccDots = dot + dot + dot + dot
cvcDots = dot + dot + dot
expiryDots = dot + dot + '/' + dot + dot

ReactCard = React.createClass

displayName: "ReactCard"
Expand All @@ -12,9 +17,9 @@ ReactCard = React.createClass
monthYear: 'month/year'
baseWidth: 350
defaultValues:
number: '•••• •••• •••• ••••'
cvc: '•••'
expiry: '••/••'
number: ccDots + " " + ccDots + " " + ccDots + " " + ccDots
cvc: cvcDots
expiry: expiryDots
name: 'Full Name'

componentWillMount: ->
Expand Down

0 comments on commit 4c830bc

Please sign in to comment.