-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Expand file tree
/
Copy pathindex.stories.tsx
More file actions
80 lines (76 loc) · 2.07 KB
/
index.stories.tsx
File metadata and controls
80 lines (76 loc) · 2.07 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
import { CodeBracketIcon } from '@heroicons/react/24/outline';
import type { Meta as MetaObj, StoryObj } from '@storybook/react';
import MetaBar from '#ui/Containers/MetaBar';
import GitHubIcon from '#ui/Icons/Social/GitHub';
type Story = StoryObj<typeof MetaBar>;
type Meta = MetaObj<typeof MetaBar>;
export const Default: Story = {
args: {
items: {
'components.metabar.lastUpdated': new Date(
'17 October 2023'
).toLocaleDateString(),
'components.metabar.readingTime': '15 minutes',
'components.metabar.addedIn': 'v1.0.0',
'components.metabar.author': 'The Node.js Project',
'components.metabar.authors': <p>...</p>,
'components.metabar.contribute': (
<>
<GitHubIcon className="fill-neutral-700 dark:fill-neutral-100" />
<a href="/contribute">Edit this page</a>
</>
),
'components.metabar.viewAs': (
<>
<CodeBracketIcon />
<a href="/json">JSON</a>
</>
),
},
headings: {
items: [
{
value: 'OpenSSL update assessment, and Node.js project plans',
depth: 1,
data: { id: 'heading-1' },
},
{
value: 'Summary',
depth: 2,
data: { id: 'summary' },
},
{
value: 'Analysis',
depth: 2,
data: { id: 'analysis' },
},
{
value: 'The c_rehash script allows command injection (CVE-2022-2068)',
depth: 3,
data: { id: 'the_c_rehash' },
},
{
value: 'Contact and future updates',
depth: 3,
data: { id: 'contact_and_future_updates' },
},
{
value: 'Email',
depth: 4,
data: { id: 'email' },
},
{
value: 'Slack',
depth: 4,
data: { id: 'slack' },
},
{
value: '#node-website',
depth: 5, // h5s do not get shown
data: { id: 'node-website' },
},
],
},
},
};
export default { component: MetaBar } as Meta;