Skip to content

Commit

Permalink
Stories for Account and Authenticate (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
benwerd committed Sep 8, 2018
1 parent ad81515 commit bd31013
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
32 changes: 32 additions & 0 deletions unlock-app/src/stories/Account.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from 'react'
import { storiesOf } from '@storybook/react'
import { Account } from '../components/Account'

let accountPicker = () => {
return false // We don't need this to do anything in the storybook context
}

storiesOf('Account')
.add('With address and balance', () => {
let account = {
address: '0xabc',
balance: '300000000000000000',
}
return (
<Account showAccountPicker={accountPicker} account={account} />
)
})
.add('With address but no balance', () => {
let account = {
address: '0xabc',
}
return (
<Account showAccountPicker={accountPicker} account={account} />
)
})
.add('With no address', () => {
let account = {}
return (
<Account showAccountPicker={accountPicker} account={account} />
)
})
14 changes: 14 additions & 0 deletions unlock-app/src/stories/Authenticate.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react'
import { storiesOf } from '@storybook/react'
import { Authenticate } from '../components/Authenticate'

let dummyFunction = () => {
return false // We don't need this to do anything in the storybook context
}

storiesOf('Authenticate')
.add('Default', () => {
return (
<Authenticate hideAccountPicker={dummyFunction} loadAccount={dummyFunction} />
)
})

0 comments on commit bd31013

Please sign in to comment.