docbrown/app/javascript/articles/__stories__/userArticle.stories.jsx
Lisa Sy ea00c808bd
Storybook: Add DocsPage and test out static content (#11397)
* Update naming of guidelines section and improve Introduction page

* Add Docs

* Add docs

* Install Docs add-on

- Rename top-level folders and sort manually
- Add MDX static pages

* Updated all Storybook addons to 6.1.3 except for notes as it's currently 5.3.21

* Fixed naming of section for the select component.

* Updated yarn.lock file.

* Added missing dependency @storybook/addon-docs

Co-authored-by: Nick Taylor <nick@dev.to>
2020-12-02 09:56:38 -08:00

37 lines
987 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: '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' };