summaryrefslogtreecommitdiffstats
path: root/src/components/organisms/layout/comment.stories.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-05-23 14:07:02 +0200
committerArmand Philippot <git@armandphilippot.com>2022-05-23 16:00:13 +0200
commit34e216546151eaf8a0a3cbb0bc8b65dae4c63bf2 (patch)
treebff34f8a1dc65f0559ddf851433f242edb092824 /src/components/organisms/layout/comment.stories.tsx
parent0f8f963ba3eccd7fd94785bf7fb216b6287cec57 (diff)
refactor: reduce the number of data transformation
Diffstat (limited to 'src/components/organisms/layout/comment.stories.tsx')
-rw-r--r--src/components/organisms/layout/comment.stories.tsx28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/components/organisms/layout/comment.stories.tsx b/src/components/organisms/layout/comment.stories.tsx
index fa4bba9..7a8ac95 100644
--- a/src/components/organisms/layout/comment.stories.tsx
+++ b/src/components/organisms/layout/comment.stories.tsx
@@ -1,5 +1,6 @@
import { ComponentMeta, ComponentStory } from '@storybook/react';
import CommentComponent from './comment';
+import { data } from './comment.fixture';
const saveComment = async () => {
/** Do nothing. */
@@ -9,7 +10,7 @@ const saveComment = async () => {
* Comment - Storybook Meta
*/
export default {
- title: 'Organisms/Layout',
+ title: 'Organisms/Layout/Comment',
component: CommentComponent,
args: {
canReply: true,
@@ -110,17 +111,18 @@ const Template: ComponentStory<typeof CommentComponent> = (args) => (
);
/**
- * Layout Stories - Comment
+ * Layout Stories - Approved
*/
-export const Comment = Template.bind({});
-Comment.args = {
- author: {
- avatar: 'http://placeimg.com/640/480',
- name: 'Armand',
- url: 'https://www.armandphilippot.com/',
- },
- content:
- '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',
+export const Approved = Template.bind({});
+Approved.args = {
+ ...data,
+};
+
+/**
+ * Layout Stories - Unapproved
+ */
+export const Unapproved = Template.bind({});
+Unapproved.args = {
+ ...data,
+ approved: false,
};