Created
July 25, 2016 14:26
-
-
Save mthuret/ea6ebf79704338c0249eec423955476f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const TWO_TODO_ITEMS_WITH_ONE_COMPLETED = getMainSection([ | |
{ id: 'one', text: 'Item One', completed: false }, | |
{ id: 'two', text: 'Item Two', completed: true }, | |
]); | |
storiesOf('MainSection', module) | |
.add('some completed', () => TWO_TODO_ITEMS_WITH_ONE_COMPLETED); | |
function getMainSection(todos) { | |
const actions = { | |
clearCompleted: action('clearCompleted'), | |
completeAll: action('completeAll') | |
}; | |
return ( | |
<div className="todoapp"> | |
<MainSection todos={todos} actions={actions} /> | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment