-
-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stories for LockMakerForm and TransactionModal (#230)
* Stories for LockMakerForm and TransactionModal * JS style fixes
- Loading branch information
Showing
2 changed files
with
46 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react' | ||
import { storiesOf } from '@storybook/react' | ||
import { Provider } from 'react-redux' | ||
import createUnlockStore from '../../createUnlockStore' | ||
import LockMakerForm from '../../components/creator/LockMakerForm' | ||
|
||
let store = createUnlockStore() | ||
|
||
storiesOf('LockMakerForm') | ||
.addDecorator(story => <Provider store={store}>{story()}</Provider>) | ||
.add('Default settings', () => { | ||
return ( | ||
<LockMakerForm /> | ||
) | ||
}) |
31 changes: 31 additions & 0 deletions
31
unlock-app/src/stories/creator/TransactionModal.stories.js
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,31 @@ | ||
import React from 'react' | ||
import { storiesOf } from '@storybook/react' | ||
import { Provider } from 'react-redux' | ||
import createUnlockStore from '../../createUnlockStore' | ||
import { TransactionModal } from '../../components/creator/TransactionModal' | ||
|
||
let store = createUnlockStore() | ||
|
||
storiesOf('TransactionModal') | ||
.addDecorator(story => <Provider store={store}>{story()}</Provider>) | ||
.add('With transaction in progress', () => { | ||
const transaction = { | ||
status: 'pending', | ||
confirmations: 3, | ||
} | ||
return ( | ||
<TransactionModal transaction={transaction} /> | ||
) | ||
}) | ||
.add('With deployed lock', () => { | ||
const transaction = { | ||
status: 'mined', | ||
confirmations: 14, | ||
lock: { | ||
address: '0xabc', | ||
}, | ||
} | ||
return ( | ||
<TransactionModal transaction={transaction} /> | ||
) | ||
}) |