The Node.js® Website
1import { CodeBracketIcon } from '@heroicons/react/24/outline';
2import type { Meta as MetaObj, StoryObj } from '@storybook/react';
3
4import AvatarGroup from '@/components/Common/AvatarGroup';
5import MetaBar from '@/components/Containers/MetaBar';
6import GitHub from '@/components/Icons/Social/GitHub';
7import Link from '@/components/Link';
8
9type Story = StoryObj<typeof MetaBar>;
10type Meta = MetaObj<typeof MetaBar>;
11
12export const Default: Story = {
13 args: {
14 items: {
15 'components.metabar.lastUpdated': new Date(
16 '17 October 2023'
17 ).toLocaleDateString(),
18 'components.metabar.readingTime': '15 minutes',
19 'components.metabar.addedIn': 'v1.0.0',
20 'components.metabar.author': 'The Node.js Project',
21 'components.metabar.authors': (
22 <AvatarGroup
23 avatars={[
24 {
25 src: 'https://avatars.githubusercontent.com/canerakdas',
26 alt: 'Caner Akdas',
27 },
28 {
29 src: 'https://avatars.githubusercontent.com/bmuenzenmeyer',
30 alt: 'Brian Muenzenmeyer',
31 },
32 {
33 src: 'https://avatars.githubusercontent.com/ovflowd',
34 alt: 'Claudio W',
35 },
36 ]}
37 />
38 ),
39 'components.metabar.contribute': (
40 <>
41 <GitHub className="fill-neutral-700 dark:fill-neutral-100" />
42 <Link href="/contribute">Edit this page</Link>
43 </>
44 ),
45 'components.metabar.viewAs': (
46 <>
47 <CodeBracketIcon />
48 <Link href="/json">JSON</Link>
49 </>
50 ),
51 },
52 headings: {
53 items: [
54 {
55 value: 'OpenSSL update assessment, and Node.js project plans',
56 depth: 1,
57 data: { id: 'heading-1' },
58 },
59 {
60 value: 'Summary',
61 depth: 2,
62 data: { id: 'summary' },
63 },
64 {
65 value: 'Analysis',
66 depth: 2,
67 data: { id: 'analysis' },
68 },
69 {
70 value: 'The c_rehash script allows command injection (CVE-2022-2068)',
71 depth: 3,
72 data: { id: 'the_c_rehash' },
73 },
74 {
75 value: 'Contact and future updates',
76 depth: 3,
77 data: { id: 'contact_and_future_updates' },
78 },
79 ],
80 },
81 },
82};
83
84export default { component: MetaBar } as Meta;