summaryrefslogtreecommitdiffstats
path: root/src/components/molecules/forms/theme-toggle.stories.tsx
blob: a9bcf734f06eb05edbecba8c8067e8fea3f2e73c (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
31
import { ComponentMeta, ComponentStory } from '@storybook/react';
import { IntlProvider } from 'react-intl';
import ThemeToggleComponent from './theme-toggle';

export default {
  title: 'Molecules/Forms',
  component: ThemeToggleComponent,
  argTypes: {
    value: {
      control: {
        type: null,
      },
      description: 'The theme value.',
      type: {
        name: 'boolean',
        required: true,
      },
    },
  },
} as ComponentMeta<typeof ThemeToggleComponent>;

const Template: ComponentStory<typeof ThemeToggleComponent> = (args) => (
  <IntlProvider locale="en">
    <ThemeToggleComponent {...args} />
  </IntlProvider>
);

export const ThemeToggle = Template.bind({});
ThemeToggle.args = {
  value: false,
};