Skip to content

Commit

Permalink
improve readme
Browse files Browse the repository at this point in the history
  • Loading branch information
shaystern committed Jul 16, 2015
1 parent 88e483c commit f48b88d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ container="react-card-container" // required

// an object contain the form inputs name. every input must have a name prop so that card-react and identify it.
formInputsNames={
number: 'CCnumber', // optional — default input[name = "number"]
expiry: 'CCexpiry',// optional — default input[name = "expiry"]
cvc: 'CCcvc', // optional — default input[name = "cvc"]
name: 'CCname' // optional - defaults input[name = "name"]
{
number: 'CCnumber', // optional — default input[name = "number"]
expiry: 'CCexpiry',// optional — default input[name = "expiry"]
cvc: 'CCcvc', // optional — default input[name = "cvc"]
name: 'CCname' // optional - defaults input[name = "name"]
}
}

// initial values to render in the card element
Expand All @@ -46,8 +48,10 @@ initialName='Michael Jordan' // optional — default FULL NAME

// the class to add to the form input and the corresponding card element when the input is valid/invalid.
classes={
valid: 'valid-input', // optional — default 'jp-card-valid'
invalid: 'invalid-input' // optional — default 'jp-card-invalid'
{
valid: 'valid-input', // optional — default 'jp-card-valid'
invalid: 'invalid-input' // optional — default 'jp-card-invalid'
}
}

// specify whether you want to format the form inputs or not
Expand Down
2 changes: 1 addition & 1 deletion example/card-loader.cjsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ CardLoader = React.createClass

initialExpiry='16/12'
initialName='Michael Jordan'
# the class to add to the form input and the corresponding card element when the input is valid/invalid.
# the class to add to the form input and the corresponding card element when the input is valid or invalid.
classes={
valid: 'valid', # optional — default 'jp-card-valid'
invalid: 'invalid' # optional — default 'jp-card-invalid'
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
"version": "1.0.3",
"description": "React component for card https://github.com/jessepollak/card",
"main": "dist/card.js",
"dependencies": {},
"dependencies": {
"payment": "0.0.7",
"classnames": "^2.1.2"
},
"devDependencies": {
"bourbon": "^4.2.3",
"browserify": "^10.2.4",
"classnames": "^2.1.2",
"coffee-react": "^3.2.0",
"coffee-reactify": "^3.0.0",
"coffee-script": "^1.9.3",
Expand All @@ -21,7 +23,6 @@
"grunt-contrib-sass": "^0.9.2",
"grunt-contrib-uglify": "^0.9.1",
"grunt-contrib-watch": "^0.6.1",
"payment": "0.0.7",
"react": "^0.13.3",
"uglify-save-license": "^0.4.1"
},
Expand Down

0 comments on commit f48b88d

Please sign in to comment.