Skip to content

Commit

Permalink
Add header and footer
Browse files Browse the repository at this point in the history
  • Loading branch information
arunoda committed Mar 24, 2016
1 parent 79890dc commit 556e31b
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
32 changes: 32 additions & 0 deletions components/stories/footer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from 'react';
import Footer from '../footer';
import { storiesOf, action } from 'react-storybook';
import {
SHOW_ALL, SHOW_COMPLETED, SHOW_ACTIVE
} from '../../constants/TodoFilters'

storiesOf('Footer', module)
.add('default view', () => (
<Footer
completedCount={10}
activeCount={4}
filter={SHOW_ALL}
onClearCompleted={action('onClearCompleted')}
onShow={action('onShow')} />
))
.add('show completed', () => (
<Footer
completedCount={10}
activeCount={4}
filter={SHOW_COMPLETED}
onClearCompleted={action('onClearCompleted')}
onShow={action('onShow')} />
))
.add('show active', () => (
<Footer
completedCount={10}
activeCount={4}
filter={SHOW_ACTIVE}
onClearCompleted={action('onClearCompleted')}
onShow={action('onShow')} />
));
5 changes: 2 additions & 3 deletions components/stories/header.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Header from '../header';
import {storiesOf, action} from 'react-storybook';
import { storiesOf, action } from 'react-storybook';

storiesOf('Header', module)
.add('default view', () => {
Expand All @@ -9,5 +9,4 @@ storiesOf('Header', module)
<Header addTodo={action('Add Todo')}/>
</div>
);
})
.add('nothing', () => (<p>Hello Man</p>))
});
1 change: 1 addition & 0 deletions components/stories/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
import './header'
import './footer'

0 comments on commit 556e31b

Please sign in to comment.