Skip to content

Instantly share code, notes, and snippets.

@tmeasday
Last active April 20, 2017 04:58
Show Gist options
  • Select an option

  • Save tmeasday/1c005993fbb7bad247fb5d4f89d44c53 to your computer and use it in GitHub Desktop.

Select an option

Save tmeasday/1c005993fbb7bad247fb5d4f89d44c53 to your computer and use it in GitHub Desktop.
import React from 'react';
import {storiesOf} from '@kadira/storybook';
import CommentList from '../CommentList';
storiesOf('CommentList', CommentList)
.add('HasData', () => (
<CommentList comments={testComments.slice(0, 3)} totalCount={3} />
))
.add('Paginated', () => <CommentList comments={testComments} totalCount={10} />)
.add('Loading', () => <CommentList loading={true} />)
.add('Empty', () => <CommentList comments={[]} />);
const testComments = [
{
text: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit.',
author: {
name: 'Luke',
avatar: 'luke.jpg',
},
},
{
text: 'Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.',
author: {
name: 'Leah',
avatar: 'leah.jpg',
},
},
{
text: 'Duis aute irure dolor in reprehenderit in voluptate.',
author: {
name: 'Han',
avatar: 'han.jpg',
},
},
{
text: 'Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.',
author: {
name: 'Poe',
avatar: 'poe.jpg',
},
},
{
text: 'Duis aute irure dolor in reprehenderit in voluptate.',
author: {
name: 'Finn',
avatar: 'finn.jpg',
},
},
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment