Browse Source

Update storybook

master
meriadec 7 years ago
parent
commit
c5a0f8e9d8
No known key found for this signature in database GPG Key ID: 1D2FC2305E2CB399
  1. 9
      src/components/RequestAmount/stories.js
  2. 4
      src/components/base/InputCurrency/stories.js

9
src/components/RequestAmount/stories.js

@ -4,12 +4,13 @@ import React from 'react'
import { storiesOf } from '@storybook/react'
import { action } from '@storybook/addon-actions'
import { number } from '@storybook/addon-knobs'
import { translate } from 'react-i18next'
import { accounts } from 'components/SelectAccount/stories'
import { RequestAmount } from 'components/RequestAmount'
const stories = storiesOf('Components/RequestAmount', module)
const stories = storiesOf('Components', module)
const props = {
counterValue: 'USD',
@ -17,8 +18,10 @@ const props = {
account: accounts[0],
}
stories.add('basic', () => (
<RequestAmount
const RequestAmountComp = translate()(RequestAmount)
stories.add('RequestAmount', () => (
<RequestAmountComp
{...props}
t={k => k}
onChange={action('onChange')}

4
src/components/base/InputCurrency/stories.js

@ -8,8 +8,8 @@ import { getDefaultUnitByCoinType } from '@ledgerhq/currencies'
import InputCurrency from 'components/base/InputCurrency'
const stories = storiesOf('Components/InputCurrency', module)
const stories = storiesOf('Components', module)
const unit = getDefaultUnitByCoinType(1)
stories.add('basic', () => <InputCurrency unit={unit} onChange={action('onChange')} />)
stories.add('InputCurrency', () => <InputCurrency unit={unit} onChange={action('onChange')} />)

Loading…
Cancel
Save