Skip to content

Commit

Permalink
Stories for LockMakerForm and TransactionModal (#230)
Browse files Browse the repository at this point in the history
* Stories for LockMakerForm and TransactionModal

* JS style fixes
  • Loading branch information
benwerd committed Sep 8, 2018
1 parent bd31013 commit b51a236
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
15 changes: 15 additions & 0 deletions unlock-app/src/stories/creator/LockMakerForm.stories.js
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 unlock-app/src/stories/creator/TransactionModal.stories.js
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} />
)
})

0 comments on commit b51a236

Please sign in to comment.