Skip to content

Commit

Permalink
✅ Add stories
Browse files Browse the repository at this point in the history
  • Loading branch information
divyanshu013 committed Aug 13, 2017
1 parent 0447672 commit 3ad5b3e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions .storybook/addons.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '@storybook/addon-knobs/register'
7 changes: 7 additions & 0 deletions .storybook/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { configure } from '@storybook/react';

function loadStories() {
require('../stories/index.js');
}

configure(loadStories, module);
14 changes: 14 additions & 0 deletions stories/index.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 { withKnobs, text, boolean, number } from '@storybook/addon-knobs';

import ReactAnimatedWeather from '../src/ReactAnimatedWeather';

const stories = storiesOf('ReactAnimatedWeather', module);
stories.addDecorator(withKnobs);

stories.add('Available props', () => (
<ReactAnimatedWeather
icon={text('icon', 'CLEAR_DAY')}
/>
));

0 comments on commit 3ad5b3e

Please sign in to comment.