aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/templates/sectioned/sectioned-layout.stories.tsx
blob: 0336b7a34cfda7378fd2ac755bf26eaa82851b9f (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import type { ComponentMeta, ComponentStory } from '@storybook/react';
import { LayoutBase } from '../layout/layout.stories';
import { SectionedLayout as SectionedLayoutComponent } from './sectioned-layout';
import { sections } from './sectioned-layout.fixtures';

/**
 * SectionedLayout - Storybook Meta
 */
export default {
  title: 'Templates/Sectioned',
  component: SectionedLayoutComponent,
  args: {
    breadcrumbSchema: [],
  },
  argTypes: {
    breadcrumbSchema: {
      control: {
        type: null,
      },
      description: 'The JSON schema for breadcrumb items.',
      type: {
        name: 'object',
        required: true,
        value: {},
      },
    },
    sections: {
      description: 'The different sections.',
      type: {
        name: 'object',
        required: true,
        value: {},
      },
    },
  },
  decorators: [
    (Story) => (
      <LayoutBase {...LayoutBase.args}>
        <Story />
      </LayoutBase>
    ),
  ],
  parameters: {
    layout: 'fullscreen',
  },
} as ComponentMeta<typeof SectionedLayoutComponent>;

const Template: ComponentStory<typeof SectionedLayoutComponent> = (args) => (
  <SectionedLayoutComponent {...args} />
);

/**
 * Sectioned Layout Stories - Default
 */
export const Sectioned = Template.bind({});
Sectioned.args = {
  sections,
};