-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Expand file tree
/
Copy pathindex.stories.tsx
More file actions
130 lines (123 loc) · 3.06 KB
/
index.stories.tsx
File metadata and controls
130 lines (123 loc) · 3.06 KB
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
118
119
120
121
122
123
124
125
126
127
128
129
130
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import ChangeHistory from '#ui/Common/ChangeHistory';
type Story = StoryObj<typeof ChangeHistory>;
type Meta = MetaObj<typeof ChangeHistory>;
const SAMPLE_CHANGES = [
{
versions: ['v15.4.0'],
label: 'No longer experimental',
url: 'https://github.com/nodejs/node/pull/12345',
},
{
versions: ['v15.0.0', 'v14.17.0'],
label: 'Added in v15.0.0, v14.17.0',
url: 'https://github.com/nodejs/node/pull/67890',
},
{
versions: ['v16.0.0'],
label: 'Deprecated in 16',
},
];
const LARGE_SAMPLE_CHANGES = [
{
versions: ['v20.0.0'],
label: 'Breaking change in v20',
url: 'https://github.com/nodejs/node/pull/50001',
},
{
versions: ['v19.8.0'],
label: 'Performance improvement',
url: 'https://github.com/nodejs/node/pull/49999',
},
{
versions: ['v19.0.0'],
label: 'API redesign',
url: 'https://github.com/nodejs/node/pull/49000',
},
{
versions: ['v18.17.0', 'v18.16.1'],
label: 'Security fix backported',
url: 'https://github.com/nodejs/node/pull/48500',
},
{
versions: ['v18.0.0'],
label: 'Major version release',
url: 'https://github.com/nodejs/node/pull/47000',
},
{
versions: ['v17.9.0'],
label: 'Experimental feature added',
url: 'https://github.com/nodejs/node/pull/46500',
},
{
versions: ['v17.0.0'],
label: 'Node.js 17 release',
url: 'https://github.com/nodejs/node/pull/45000',
},
{
versions: ['v16.15.0', 'v16.14.2'],
label: 'Bug fix release',
url: 'https://github.com/nodejs/node/pull/44000',
},
{
versions: ['v16.0.0'],
label: 'Deprecated in v16',
url: 'https://github.com/nodejs/node/pull/43000',
},
{
versions: ['v15.14.0'],
label: 'Feature enhancement',
url: 'https://github.com/nodejs/node/pull/42000',
},
{
versions: ['v15.0.0', 'v14.17.0'],
label: 'Initial implementation',
url: 'https://github.com/nodejs/node/pull/41000',
},
{
versions: ['v14.18.0'],
label: 'Documentation update',
url: 'https://github.com/nodejs/node/pull/40000',
},
{
versions: ['v14.0.0'],
label: 'Added to stable API',
url: 'https://github.com/nodejs/node/pull/39000',
},
{
versions: ['v13.14.0'],
label: 'Experimental flag removed',
url: 'https://github.com/nodejs/node/pull/38000',
},
{
versions: ['v12.22.0', 'v12.21.0'],
label: 'Backported to LTS',
url: 'https://github.com/nodejs/node/pull/37000',
},
{
versions: ['v12.0.0'],
label: 'First experimental version',
url: 'https://github.com/nodejs/node/pull/36000',
},
];
export const Default: Story = {
render: args => (
<div className="right-0 flex justify-end">
<ChangeHistory {...args} />
</div>
),
args: {
changes: SAMPLE_CHANGES,
},
};
export const LargeHistory: Story = {
render: args => (
<div className="right-0 flex justify-end">
<ChangeHistory {...args} />
</div>
),
args: {
changes: LARGE_SAMPLE_CHANGES,
},
};
export default { component: ChangeHistory } as Meta;