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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
import type { ComponentMeta, ComponentStory } from '@storybook/react';
import { Layout as LayoutComponent } from './layout';
/**
* Layout - Storybook Meta
*/
export default {
title: 'Templates/LayoutBase',
component: LayoutComponent,
args: {
breadcrumbSchema: [],
isHome: false,
},
argTypes: {
children: {
control: {
type: 'text',
},
description: 'The article content.',
type: {
name: 'string',
required: true,
},
},
breadcrumbSchema: {
control: {
type: 'null',
},
description: 'The JSON schema for breadcrumb items.',
type: {
name: 'object',
required: true,
value: {},
},
},
isHome: {
control: {
type: 'boolean',
},
description: 'Determine if it is the homepage.',
table: {
category: 'Options',
defaultValue: { summary: false },
},
type: {
name: 'boolean',
required: false,
},
},
className: {
control: {
type: 'text',
},
description: 'Set additional classnames to the article element.',
table: {
category: 'Styles',
},
type: {
name: 'string',
required: false,
},
},
useGrid: {
control: {
type: 'boolean',
},
description: 'Use the grid layout.',
table: {
category: 'Options',
},
type: {
name: 'boolean',
required: false,
},
},
withExtraPadding: {
control: {
type: 'boolean',
},
description: 'Set additional padding at the bottom of the page.',
table: {
category: 'Options',
},
type: {
name: 'boolean',
required: false,
},
},
},
decorators: [
(Story) => (
<div
id="__next"
style={{
flex: 1,
display: 'flex',
flexFlow: 'column nowrap',
minHeight: '100vh',
}}
>
<Story />
</div>
),
],
parameters: {
layout: 'fullscreen',
},
} as ComponentMeta<typeof LayoutComponent>;
const Template: ComponentStory<typeof LayoutComponent> = (args) => (
<LayoutComponent {...args} />
);
/**
* Layout Stories - Default
*/
export const LayoutBase = Template.bind({});
|