-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #186 from appfolio/addCreditCardInput
gt - Refactor CreditCard components
- Loading branch information
Showing
11 changed files
with
61 additions
and
342 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import React from 'react'; | ||
import { CreditCardExpiration, CreditCardInput, CreditCardNumber } from '../src'; | ||
import { storiesOf } from '@kadira/storybook'; | ||
import { array, number, text } from '@kadira/storybook-addon-knobs'; | ||
|
||
const TODAY = new Date(); | ||
|
||
storiesOf('CreditCardInput', module) | ||
.addWithInfo('Live example', () => ( | ||
<CreditCardInput | ||
cardNumber={text('cardNumber', '4111 1111 1111 1111')} | ||
cardCVV={text('cardCVV', '12345')} | ||
expirationMonth={number('expirationMonth', TODAY.getMonth() + 1)} | ||
expirationYear={number('expirationYear', TODAY.getFullYear() + 1)} | ||
/> | ||
)) | ||
.addWithInfo('CreditCardExpiration', () => ( | ||
<CreditCardExpiration /> | ||
)) | ||
.addWithInfo('CreditCardNumber', () => ( | ||
<CreditCardNumber | ||
value={text('value', '4111111111111111')} | ||
allowedBrands={array('allowedBrands', [ | ||
'american-express', | ||
'diners-club', | ||
'master-card', | ||
'discover', | ||
'jcb', | ||
'visa' | ||
])} | ||
/> | ||
)); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.