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
- adds missing date picker docs
- migrates documentation in MDX to stories.js instead
- creates OpenClosedTemplate to display both states in a single story on
the docs page
- adds Range variant to the sidebar since that control isn't in the table
* A date picker displays a text field input with a button next to it, and can display two text fields next to each other for choosing a date range.
@@ -28,7 +28,7 @@ export default {
28
28
if: {arg: "isInvalid",truthy: false},
29
29
},
30
30
isDateTimeRange: {
31
-
name: "Date and Time styling",
31
+
name: "Date and time styling",
32
32
type: {name: "boolean"},
33
33
table: {
34
34
type: {summary: "boolean"},
@@ -81,16 +81,31 @@ export default {
81
81
82
82
exportconstDefault=DatePickerGroup.bind({});
83
83
Default.args={};
84
-
Default.parameters={
84
+
Default.tags=["!autodocs"];
85
+
86
+
// ********* DOCS ONLY ********* //
87
+
/**
88
+
* Default styling for date pickers display a visible field button. This style works best in a dense array of controls where the field button helps separate the dropdown from its surroundings.
89
+
*
90
+
* The standard implementation for a date picker incorporates the display of a [calendar](/docs/components-calendar--docs) within a [popover component](/docs/components-popover--docs).
* The quiet style works best when a clear layout (vertical stack, table, grid) makes it easy to parse.
107
+
*/
108
+
exportconstQuiet=OpenClosedTemplate.bind({});
94
109
Quiet.tags=["!dev"];
95
110
Quiet.args={
96
111
isQuiet: true,
@@ -99,11 +114,14 @@ Quiet.parameters = {
99
114
chromatic: {disableSnapshot: true},
100
115
docs: {
101
116
story: {
102
-
height: "300px"
117
+
height: "350px",
103
118
}
104
119
},
105
120
};
106
121
122
+
/**
123
+
* Date pickers can be used to select a date range (a start date and an end date).
124
+
*/
107
125
exportconstRange=Template.bind({});
108
126
Range.args={
109
127
lastDay: 3,
@@ -125,7 +143,11 @@ QuietRange.args = {
125
143
QuietRange.parameters={
126
144
chromatic: {disableSnapshot: true},
127
145
};
146
+
QuietRange.storyName="Range, quiet";
128
147
148
+
/**
149
+
* A date picker can be marked as having an error to show that a value needs to be entered in order to move forward, or that an entered value is invalid.
0 commit comments