Skip to content

Commit 751e883

Browse files
committed
5398: Utilize storybook argTypes
1 parent 0331724 commit 751e883

File tree

1 file changed

+59
-44
lines changed

1 file changed

+59
-44
lines changed

src/stories/Library/Modals/modal-profile/ModalProfile.stories.tsx

Lines changed: 59 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,64 @@ export default {
77
title: "Library / Modals / Profile",
88
component: ModalProfile,
99
decorators: [withDesign],
10-
argTypes: {},
10+
argTypes: {
11+
showModal: {
12+
control: "boolean",
13+
defaultValue: true,
14+
},
15+
headerName: {
16+
control: { type: "text" },
17+
defaultValue: "Christine-Olivia Kristensen har et meget langt navn",
18+
},
19+
headerLinkHref: {
20+
control: { type: "text" },
21+
defaultValue: "/",
22+
},
23+
headerLinkText: {
24+
control: { type: "text" },
25+
defaultValue: "Se din profil",
26+
},
27+
profileNavLinks: {
28+
control: { type: "object" },
29+
defaultValue: [
30+
{
31+
title: "Lån",
32+
href: "/",
33+
counter: "12",
34+
},
35+
{
36+
title: "Reserveringer",
37+
href: "/",
38+
counter: "7",
39+
},
40+
{
41+
title: "Huskeliste",
42+
href: "/",
43+
counter: "",
44+
},
45+
{
46+
title: "Gebyrer og erstatninger",
47+
href: "/",
48+
counter: "",
49+
},
50+
{
51+
title: "Gemte søgninger",
52+
href: "/",
53+
counter: "3",
54+
},
55+
{
56+
title: "Lånehistorik",
57+
href: "/",
58+
counter: "",
59+
},
60+
{
61+
title: "Brugeroplysninger",
62+
href: "/",
63+
counter: "",
64+
},
65+
],
66+
},
67+
},
1168
parameters: {
1269
design: {
1370
type: "figma",
@@ -21,46 +78,4 @@ const Template: ComponentStory<typeof ModalProfile> = (args) => (
2178
);
2279

2380
export const Item = Template.bind({});
24-
Item.args = {
25-
showModal: true,
26-
headerName: "Christine-Olivia Kristensen har et meget langt navn",
27-
headerLinkHref: "/",
28-
headerLinkText: "Se din profil",
29-
profileNavLinks: [
30-
{
31-
title: "Lån",
32-
href: "/",
33-
counter: "12",
34-
},
35-
{
36-
title: "Reserveringer",
37-
href: "/",
38-
counter: "7",
39-
},
40-
{
41-
title: "Huskeliste",
42-
href: "/",
43-
counter: "",
44-
},
45-
{
46-
title: "Gebyrer og erstatninger",
47-
href: "/",
48-
counter: "",
49-
},
50-
{
51-
title: "Gemte søgninger",
52-
href: "/",
53-
counter: "3",
54-
},
55-
{
56-
title: "Lånehistorik",
57-
href: "/",
58-
counter: "",
59-
},
60-
{
61-
title: "Brugeroplysninger",
62-
href: "/",
63-
counter: "",
64-
},
65-
],
66-
};
81+
Item.args = {};

0 commit comments

Comments
 (0)