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
- enforces orientation for divider test cases
- creates new minDimensionValues arg to use as visualization. Because
the inline and block sizes of the divider are dependant on content
(which doesn't exist on this component), this new arg sets example values
for min-inline-size and min-block-size. Any other customStyles passed to
the component should still render as before, and we are relying on the
CSS now instead of the styleMap in the default template.
- refactors the min-inline-size/min-block-size in styleMap to use new
minDimensionValues arg
- adds extra documentation
- corrects the default size of divider to small
Copy file name to clipboardExpand all lines: components/divider/stories/divider.stories.js
+18-16Lines changed: 18 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -41,37 +41,49 @@ export default {
41
41
control: "boolean",
42
42
},
43
43
tag: {table: {disable: true}},
44
+
minDimensionValues: {table: {disable: true}},
44
45
},
45
46
args: {
46
47
rootClass: "spectrum-Divider",
47
-
size: "m",
48
+
size: "s",
48
49
vertical: false,
50
+
minDimensionValues: true,
49
51
},
50
52
parameters: {
51
53
componentVersion: version,
52
54
},
53
55
};
54
56
55
57
/**
56
-
* The default size for divider is medium.
58
+
* By default, dividers are horizontal and should be used for separating content vertically. The small divider is the default size.
57
59
*/
58
60
exportconstDefault=DividerGroup.bind({});
59
61
Default.args={};
60
62
61
63
// ********* DOCS ONLY ********* //
64
+
/**
65
+
* To divide similar components such as table rows, action button groups, and components within a panel, use the default, small divider.
66
+
*
67
+
* The medium divider is used for dividing subsections on a page, or to separate different groupings of components such as panels, rails, etc.
68
+
*
69
+
* Only use the large divider for page titles or section titles.
70
+
*/
62
71
exportconstSizing=(args,context)=>Sizes({
63
72
Template,
64
73
withHeading: false,
65
74
withBorder: false,
66
75
...args,
67
76
},context);
77
+
Sizing.args={
78
+
minDimensionValues: true,
79
+
};
68
80
Sizing.tags=["!dev"];
69
81
Sizing.parameters={
70
82
chromatic: {disableSnapshot: true},
71
83
};
72
84
73
85
/**
74
-
* When a vertical divider is used inside of a flex container, use `align-self: stretch; block-size: auto;` on the divider.
86
+
* The vertical divider is used to separate content horizontally. When a vertical divider is used inside of a flex container, use `align-self: stretch; block-size: 100%;` on the divider.
0 commit comments