Skip to content

Commit e155ed2

Browse files
committed
chore: set defaultValue in argument instead of arg types
Signed-off-by: Akshat Patel <akshat@live.ca>
1 parent 1c7f394 commit e155ed2

25 files changed

+97
-96
lines changed

src/breadcrumb/breadcrumb.stories.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,16 @@ export default {
3030
imports: [BreadcrumbModule]
3131
})
3232
],
33+
args: {
34+
noTrailingSlash: true,
35+
skeleton: false
36+
},
3337
argTypes: {
3438
noTrailingSlash: {
35-
type: "boolean",
36-
defaultValue: true
39+
type: "boolean"
3740
},
3841
skeleton: {
3942
type: "boolean",
40-
defaultValue: false,
4143
control: false
4244
}
4345
},

src/button/button.stories.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ export default {
1414
]
1515
})
1616
],
17+
args: {
18+
kind: "primary",
19+
size: "md",
20+
isExpressive: "false",
21+
disabled: false
22+
},
1723
argTypes: {
1824
kind: {
1925
options: [
@@ -26,22 +32,18 @@ export default {
2632
"danger--tertiary",
2733
"danger--ghost"
2834
],
29-
defaultValue: "primary",
3035
control: { type: "select" },
3136
name: "cdsButton"
3237
},
3338
size: {
3439
options: ["sm", "md", "lg", "xl", "2xl"],
35-
defaultValue: "md",
3640
control: { type: "select" }
3741
},
3842
isExpressive: {
39-
type: "boolean",
40-
defaultValue: false
43+
type: "boolean"
4144
},
4245
disabled: {
43-
type: "boolean",
44-
defaultValue: false
46+
type: "boolean"
4547
},
4648
// Actions
4749
onClick: { action: "clicked" },

src/button/icon-button.stories.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,18 @@ export default {
1717
]
1818
})
1919
],
20+
args: {
21+
align: "bottom",
22+
kind: "primary",
23+
size: "md",
24+
isExpressive: "false",
25+
disabled: false
26+
},
2027
argTypes: {
28+
align: {
29+
options: ["top", "left", "bottom", "right"],
30+
control: { type: "select" }
31+
},
2132
kind: {
2233
options: [
2334
"primary",
@@ -29,22 +40,18 @@ export default {
2940
"danger--tertiary",
3041
"danger--ghost"
3142
],
32-
defaultValue: "primary",
3343
control: { type: "select" },
3444
name: "cdsButton"
3545
},
3646
size: {
3747
options: ["sm", "md", "lg", "xl", "2xl"],
38-
defaultValue: "md",
3948
control: { type: "select" }
4049
},
4150
isExpressive: {
42-
type: "boolean",
43-
defaultValue: false
51+
type: "boolean"
4452
},
4553
disabled: {
46-
type: "boolean",
47-
defaultValue: false
54+
type: "boolean"
4855
},
4956
// Actions
5057
onClick: { action: "clicked" },
@@ -90,10 +97,3 @@ Basic.args = {
9097
"example-global-class": true
9198
}
9299
};
93-
Basic.argTypes = {
94-
align: {
95-
options: ["top", "left", "bottom", "right"],
96-
defaultValue: "bottom",
97-
control: { type: "select" }
98-
}
99-
};

src/combobox/combobox.stories.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,17 @@ export default {
6868
],
6969
appendInline: false,
7070
dropUp: false,
71-
selectionFeedback: "top-after-reopen"
71+
selectionFeedback: "top-after-reopen",
72+
size: "md",
73+
theme: "dark"
7274
},
7375
argTypes: {
7476
size: {
7577
options: ["sm", "md", "lg"],
76-
defaultValue: "md",
7778
control: "radio"
7879
},
7980
theme: {
8081
options: ["light", "dark"],
81-
defaultValue: "dark",
8282
control: "radio"
8383
},
8484
maxLength: {

src/datepicker/datepicker.stories.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ export default {
1818
warnText: "This is a warning",
1919
warn: false,
2020
disabled: false,
21-
language: "en"
21+
language: "en",
22+
theme: "dark",
23+
size: "md"
2224
},
2325
argTypes: {
2426
theme: {
2527
options: ["light", "dark"],
26-
defaultValue: "dark",
2728
control: "radio"
2829
},
2930
size: {
3031
options: ["sm", "md", "lg"],
31-
defaultValue: "md",
3232
control: "radio"
3333
},
3434
valueChange: {
@@ -96,12 +96,12 @@ const SingleTemplate = (args) => ({
9696
});
9797
export const Single = SingleTemplate.bind({});
9898
Single.args = {
99-
dateFormat: "m/d/y"
99+
dateFormat: "m/d/y",
100+
language: "en"
100101
};
101102
Single.argTypes = {
102103
language: {
103104
options: ["en", "de", "fi", "ja", "zh", "es", "fr", "it", "ko", "pt"],
104-
defaultValue: "en",
105105
control: "select"
106106
}
107107
};

src/dropdown/dropdown.stories.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,20 @@ export default {
4343
}
4444
],
4545
appendInline: false,
46-
dropUp: false
46+
dropUp: false,
47+
size: "md",
48+
theme: "dark"
4749
},
4850
argTypes: {
4951
type: {
5052
control: false
5153
},
5254
size: {
5355
options: ["sm", "md", "lg"],
54-
defaultValue: "md",
5556
control: "radio"
5657
},
5758
theme: {
5859
options: ["light", "dark"],
59-
defaultValue: "dark",
6060
control: "radio"
6161
},
6262
selected: { action: "Selection changed!" },

src/file-uploader/file-uploader.stories.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,22 @@ export default {
3636
description: "only .jpg and .png files. 500kb max file size.",
3737
buttonText: "Add files",
3838
disabled: false,
39-
multiple: true
39+
multiple: true,
40+
size: "md",
41+
buttonType: "primary",
42+
fileItemSize: "lg"
4043
},
4144
argTypes: {
4245
size: {
4346
options: ["sm", "md", "lg"],
44-
defaultValue: "md",
4547
control: "radio"
4648
},
4749
buttonType: {
4850
options: ["primary", "secondary", "tertiary", "ghost", "danger"],
49-
defaultValue: "primary",
5051
control: "select"
5152
},
5253
fileItemSize: {
5354
options: ["sm", "md", "lg"],
54-
defaultValue: "lg",
5555
control: "radio"
5656
}
5757
},

src/input/input.stories.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,22 @@ Basic.args = {
4545
warnText: "This is a warning!",
4646
label: "Text input label",
4747
helperText: "Optional helper text",
48-
placeholder: "Placeholder"
48+
placeholder: "Placeholder",
49+
autocomplete: "on",
50+
theme: "dark",
51+
size: "md"
4952
};
5053
Basic.argTypes = {
5154
autocomplete: {
5255
options: ["on", "off"],
53-
defaultValue: "on",
5456
control: "radio"
5557
},
5658
theme: {
5759
options: ["light", "dark"],
58-
defaultValue: "dark",
5960
control: "radio"
6061
},
6162
size: {
6263
options: ["sm", "md", "lg"],
63-
defaultValue: "md",
6464
contorl: "select"
6565
}
6666
};

src/input/textarea.stories.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,22 @@ Basic.args = {
4545
helperText: "Optional helper text",
4646
placeholder: "Placeholder",
4747
cols: 50,
48-
rows: 4
48+
rows: 4,
49+
autocomplete: "on",
50+
theme: "dark",
51+
size: "md"
4952
};
5053
Basic.argTypes = {
5154
autocomplete: {
5255
options: ["on", "off"],
53-
defaultValue: "on",
5456
control: "radio"
5557
},
5658
theme: {
5759
options: ["light", "dark"],
58-
defaultValue: "dark",
5960
control: "radio"
6061
},
6162
size: {
6263
options: ["sm", "md", "lg"],
63-
defaultValue: "md",
6464
contorl: "select"
6565
}
6666
};

src/loading/loading.stories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ const Template = (args) => ({
2222
export const Basic = Template.bind({});
2323
Basic.args = {
2424
isActive: true,
25-
overlay: false
25+
overlay: false,
26+
size: "normal"
2627
};
2728
Basic.argTypes = {
2829
size: {
2930
options: ["sm", "normal"],
30-
defaultValue: "normal",
3131
control: "radio"
3232
}
3333
};

0 commit comments

Comments
 (0)