You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/buttongroup/stories/buttongroup.stories.js
+73-11Lines changed: 73 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ import pkgJson from "../package.json";
5
5
import{ButtonGroup}from"./buttongroup.test.js";
6
6
7
7
/**
8
-
* A grouping of buttons.
8
+
* A button group is a grouping of buttons whose actions are related to each other.
9
9
*/
10
10
exportdefault{
11
11
title: "Button group",
@@ -36,34 +36,96 @@ export default {
36
36
size: "m",
37
37
iconName: undefined,
38
38
vertical: false,
39
+
items: [
40
+
{
41
+
variant: "secondary",
42
+
treatment: "outline",
43
+
label: "No, thanks",
44
+
45
+
},
46
+
{
47
+
variant: "secondary",
48
+
treatment: "outline",
49
+
label: "Remind me later",
50
+
},
51
+
{
52
+
variant: "primary",
53
+
treatment: "fill",
54
+
label: "Rate now",
55
+
},
56
+
],
39
57
},
40
58
parameters: {
41
59
packageJson: pkgJson,
42
60
},
43
61
};
44
62
45
63
exportconstDefault=ButtonGroup.bind({});
46
-
Default.args={
64
+
Default.args={};
65
+
Default.tags=["!autodocs"];
66
+
67
+
// ********* DOCS ONLY ********* //
68
+
69
+
/**
70
+
* Default spacing for Medium, Large, and Extra Large t-shirt sizes.
71
+
*/
72
+
exportconstHorizontal=ButtonGroup.bind({});
73
+
Horizontal.tags=["!dev"];
74
+
Horizontal.args=Default.args;
75
+
76
+
77
+
/**
78
+
* Spacing for the Small t-shirt size.
79
+
*/
80
+
exportconstHorizontalSmall=ButtonGroup.bind({});
81
+
HorizontalSmall.tags=["!dev"];
82
+
HorizontalSmall.args={
83
+
size: "s"
84
+
};
85
+
86
+
/**
87
+
* Default spacing for Medium, Large, and Extra Large t-shirt sizes
88
+
*/
89
+
exportconstVertical=ButtonGroup.bind({});
90
+
Vertical.tags=["!dev"];
91
+
Vertical.args={
92
+
vertical: true,
93
+
};
94
+
95
+
/**
96
+
* Spacing for the Small t-shirt size.
97
+
*/
98
+
exportconstVerticalSmall=ButtonGroup.bind({});
99
+
VerticalSmall.tags=["!dev"];
100
+
VerticalSmall.args={
101
+
vertical: true,
102
+
size: "s"
103
+
};
104
+
105
+
/**
106
+
* A button group in a disabled state shows that the buttons within the group exist, but are not available in that circumstance. This state can be used to maintain layout continuity and to communicate that a button group may become available later.
0 commit comments