aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/forms/search-form/search-form.stories.ts
blob: 203d4a654a6504b61a731fda93d7f0a57afa1ec3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import type { Meta, StoryObj } from '@storybook/react';
import { SearchForm, type SearchFormSubmit } from './search-form';

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

export default meta;

type Story = StoryObj<typeof meta>;

const search: SearchFormSubmit = () => {
  console.log('Searching!');

  return undefined;
};

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

export const WithLabelHidden: Story = {
  args: {
    isLabelHidden: true,
    onSubmit: search,
  },
};