Skip to content
Permalink
Browse files

[DDW-646] Make knob on delegation story in storybook

  • Loading branch information...
yakovkaravelov committed May 16, 2019
1 parent d14764d commit 3d621ce03998bb19b926aef1d623e0ff10a28628
Showing with 11 additions and 2 deletions.
  1. +11 −2 storybook/stories/Delegation.stories.js
@@ -1,17 +1,26 @@
// @flow
import React from 'react';
import { storiesOf } from '@storybook/react';
import { withKnobs, number } from '@storybook/addon-knobs';
import StoryDecorator from './support/StoryDecorator';
import Delegation from '../../source/renderer/app/components/staking/Delegation';

const timeLeft = (78 * 60 + 10) * 60 * 1000;

storiesOf('Delegation', module)
.addDecorator(story => <StoryDecorator>{story()}</StoryDecorator>)
.addDecorator((story, context) => (
<StoryDecorator>{withKnobs(story, context)}</StoryDecorator>
))
// ====== Stories ======

.add('Start', () => (
<div>
<Delegation currentLocale="en-US" timeLeft={timeLeft} />
<Delegation
currentLocale="en-US"
timeLeft={number('Time Left (miliseconds)', timeLeft, {
min: 0,
step: 1000,
})}
/>
</div>
));

0 comments on commit 3d621ce

Please sign in to comment.
You can’t perform that action at this time.