Last active
April 20, 2017 04:58
-
-
Save tmeasday/1c005993fbb7bad247fb5d4f89d44c53 to your computer and use it in GitHub Desktop.
Raw
CommentList.js
This file contains hidden or 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
Show hidden characters
| 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