docbrown/app/javascript/articles/__stories__/userArticle.stories.jsx
Emma Goto 977e8aec45
Bump storybook to version 6 (#9766)
* Bump storybook to version 6

* Remove storybook addon-docs and revert back to storybook/addon-notes

Co-authored-by: Nick Taylor <nick@dev.to>
2020-08-17 10:34:43 +02:00

37 lines
989 B
JavaScript

import { h } from 'preact';
import { action } from '@storybook/addon-actions';
import { withKnobs, object, text } from '@storybook/addon-knobs';
import { Article } from '..';
import {
assetPath,
userArticle,
} from '../__tests__/utilities/articleUtilities';
import '../../../assets/stylesheets/articles.scss';
const ICONS = {
REACTIONS_ICON: assetPath('reactions-stack.png'),
COMMENTS_ICON: assetPath('comments-bubble.png'),
VIDEO_ICON: assetPath('video-camera.svg'),
};
const commonProps = {
bookmarkClick: action('Saved/unsaved article'),
};
export default {
title: '4_App Components/Article/User',
decorators: [withKnobs],
};
export const UserArticle = () => (
<Article
{...commonProps}
reactionsIcon={text('reactionsIcon', ICONS.REACTIONS_ICON)}
commentsIcon={text('commentsIcon', ICONS.COMMENTS_ICON)}
videoIcon={text('videoIcon', ICONS.VIDEO_ICON)}
article={object('article', userArticle)}
/>
);
UserArticle.story = { name: 'default' };