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
|
import type { ComponentMeta, ComponentStory } from '@storybook/react';
import { Icon } from '../../atoms';
import { Copyright } from '../copyright';
import { Colophon } from './colophon';
/**
* Colophon - Storybook Meta
*/
export default {
title: 'Molecules/Colophon',
component: Colophon,
argTypes: {
copyright: {
description: 'The website copyright.',
type: {
name: 'object',
required: true,
value: {},
},
},
links: {
control: {
type: 'object',
},
description:
'Adds links to the colophon (a Legal Notice link for example).',
table: {
category: 'Options',
},
type: {
name: 'object',
required: false,
value: {},
},
},
},
} as ComponentMeta<typeof Colophon>;
const Template: ComponentStory<typeof Colophon> = (args) => (
<Colophon {...args} />
);
/**
* Colophon Stories - Default
*/
export const Default = Template.bind({});
Default.args = {
copyright: <Copyright from="2021" owner="Brand" to="2023" />,
};
/**
* Colophon Stories - WithLicense
*/
export const WithLicense = Template.bind({});
WithLicense.args = {
copyright: <Copyright from="2021" owner="Brand" to="2023" />,
license: <Icon heading="CC BY SA" shape="cc-by-sa" />,
};
/**
* Colophon Stories - WithLinks
*/
export const WithLinks = Template.bind({});
WithLinks.args = {
copyright: <Copyright from="2021" owner="Brand" to="2023" />,
links: [
{ href: '#legal', id: 'item-1', label: 'Legal notice' },
{ href: '#credits', id: 'item-2', label: 'Credits' },
],
};
/**
* Colophon Stories - WithLicenseAndLinks
*/
export const WithLicenseAndLinks = Template.bind({});
WithLicenseAndLinks.args = {
copyright: <Copyright from="2021" owner="Brand" to="2023" />,
license: <Icon heading="CC BY SA" shape="cc-by-sa" />,
links: [
{ href: '#legal', id: 'item-1', label: 'Legal notice' },
{ href: '#credits', id: 'item-2', label: 'Credits' },
],
};
|