aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/forms/comment-form/comment-form.stories.ts
blob: 0518f61bba912e824cc314e27900a7646c35b0f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import type { Meta, StoryObj } from '@storybook/react';
import { CommentForm, type CommentFormSubmit } from './comment-form';

const meta = {
  component: CommentForm,
  title: 'Organisms/Forms/Comment',
} satisfies Meta<typeof CommentForm>;

export default meta;

type Story = StoryObj<typeof meta>;

const saveComment: CommentFormSubmit = () => {
  console.log('Comment saved!');

  return undefined;
};

export const Example: Story = {
  args: {
    onSubmit: saveComment,
  },
};