Skip to content

Instantly share code, notes, and snippets.

@mthuret
Created July 25, 2016 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mthuret/ea6ebf79704338c0249eec423955476f to your computer and use it in GitHub Desktop.
Save mthuret/ea6ebf79704338c0249eec423955476f to your computer and use it in GitHub Desktop.
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