summaryrefslogtreecommitdiffstats
path: root/src/components/organisms/layout/comment.stories.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-05-15 17:45:41 +0200
committerArmand Philippot <git@armandphilippot.com>2022-05-15 19:06:42 +0200
commitc95cce04393080a52a54191cff7be8fec68af4b0 (patch)
tree1022bc574c8fc8e657be922b26c1cf16cbfd9071 /src/components/organisms/layout/comment.stories.tsx
parent235fe67d770f83131c9ec10b99012319440db690 (diff)
chore: add Article pages
Diffstat (limited to 'src/components/organisms/layout/comment.stories.tsx')
-rw-r--r--src/components/organisms/layout/comment.stories.tsx39
1 files changed, 30 insertions, 9 deletions
diff --git a/src/components/organisms/layout/comment.stories.tsx b/src/components/organisms/layout/comment.stories.tsx
index 3794b06..c31b77a 100644
--- a/src/components/organisms/layout/comment.stories.tsx
+++ b/src/components/organisms/layout/comment.stories.tsx
@@ -1,13 +1,19 @@
import { ComponentMeta, ComponentStory } from '@storybook/react';
-import { IntlProvider } from 'react-intl';
import CommentComponent from './comment';
+const saveComment = async () => {
+ /** Do nothing. */
+};
+
/**
* Comment - Storybook Meta
*/
export default {
title: 'Organisms/Layout',
component: CommentComponent,
+ args: {
+ saveComment,
+ },
argTypes: {
author: {
description: 'The author data.',
@@ -51,6 +57,29 @@ export default {
required: true,
},
},
+ Notice: {
+ control: {
+ type: null,
+ },
+ description: 'A component to display a success or error message.',
+ table: {
+ category: 'Options',
+ },
+ type: {
+ name: 'function',
+ required: false,
+ },
+ },
+ parentId: {
+ control: {
+ type: null,
+ },
+ description: 'The parent id if it is a reply.',
+ type: {
+ name: 'number',
+ required: false,
+ },
+ },
publication: {
description: 'The publication date.',
type: {
@@ -73,13 +102,6 @@ export default {
},
},
},
- decorators: [
- (Story) => (
- <IntlProvider locale="en">
- <Story />
- </IntlProvider>
- ),
- ],
} as ComponentMeta<typeof CommentComponent>;
const Template: ComponentStory<typeof CommentComponent> = (args) => (
@@ -100,7 +122,6 @@ Comment.args = {
'Harum aut cumque iure fugit neque sequi cupiditate repudiandae laudantium. Ratione aut assumenda qui illum voluptas accusamus quis officiis exercitationem. Consectetur est harum eius perspiciatis officiis nihil. Aut corporis minima debitis adipisci possimus debitis et.',
id: 2,
publication: '2021-04-03 23:04:24',
- saveComment: () => null,
// @ts-ignore - Needed because of the placeholder image.
unoptimized: true,
};