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
|
import type { Meta, StoryObj } from '@storybook/react';
import NextImage from 'next/image';
import { Heading } from '../../../atoms';
import { ImageWidget } from './image-widget';
const meta = {
component: ImageWidget,
title: 'Organisms/Widgets/Image',
} satisfies Meta<typeof ImageWidget>;
export default meta;
type Story = StoryObj<typeof meta>;
const image = {
alt: '',
height: 480,
src: 'https://picsum.photos/640/480',
width: 640,
};
export const Example: Story = {
args: {
heading: (
<Heading isFake level={3}>
Quo et totam
</Heading>
),
img: <NextImage {...image} />,
},
};
export const WithDescription: Story = {
args: {
description: 'Any image used as an example',
heading: (
<Heading isFake level={3}>
Quo et totam
</Heading>
),
img: <NextImage {...image} />,
},
};
export const WithLink: Story = {
args: {
heading: (
<Heading isFake level={3}>
Quo et totam
</Heading>
),
img: <NextImage {...image} />,
url: 'https://www.armandphilippot.com/',
},
};
export const WithDescriptionAndLink: Story = {
args: {
description: 'Any image used as an example',
heading: (
<Heading isFake level={3}>
Quo et totam
</Heading>
),
img: <NextImage {...image} />,
url: 'https://www.armandphilippot.com/',
},
};
|