@@ -40,6 +40,13 @@ export const Default: Story = {
40
40
args : {
41
41
children : "Button" ,
42
42
} ,
43
+ parameters : {
44
+ docs : {
45
+ description : {
46
+ story : "Button with default appearance" ,
47
+ } ,
48
+ } ,
49
+ } ,
43
50
} ;
44
51
45
52
export const DefaultDisabled : Story = {
@@ -49,6 +56,13 @@ export const DefaultDisabled: Story = {
49
56
children : "Button" ,
50
57
disabled : true ,
51
58
} ,
59
+ parameters : {
60
+ docs : {
61
+ description : {
62
+ story : "Disabled button with default appearance" ,
63
+ } ,
64
+ } ,
65
+ } ,
52
66
} ;
53
67
54
68
export const Base : Story = {
@@ -58,6 +72,13 @@ export const Base: Story = {
58
72
children : "Base button" ,
59
73
appearance : "base" ,
60
74
} ,
75
+ parameters : {
76
+ docs : {
77
+ description : {
78
+ story : "Button with base appearance" ,
79
+ } ,
80
+ } ,
81
+ } ,
61
82
} ;
62
83
63
84
export const BaseDisabled : Story = {
@@ -68,29 +89,46 @@ export const BaseDisabled: Story = {
68
89
appearance : "base" ,
69
90
disabled : true ,
70
91
} ,
92
+ parameters : {
93
+ docs : {
94
+ description : {
95
+ story : "Disabled button with base appearance" ,
96
+ } ,
97
+ } ,
98
+ } ,
71
99
} ;
72
100
73
101
export const Link = {
74
102
name : "Link" ,
75
103
76
104
args : {
77
105
children : "Link button" ,
78
- appearance : "base" ,
79
- element : "a" ,
80
- href : "#test" ,
106
+ appearance : "link" ,
107
+ } ,
108
+ parameters : {
109
+ docs : {
110
+ description : {
111
+ story : "Button with link appearance" ,
112
+ } ,
113
+ } ,
81
114
} ,
82
115
} ;
83
116
84
- export const LinkDisabled : Story < HTMLProps < HTMLAnchorElement > > = {
117
+ export const LinkDisabled = {
85
118
name : "Link disabled" ,
86
119
87
120
args : {
88
121
children : "Link button disabled" ,
89
- appearance : "base" ,
90
- element : "a" ,
91
- href : "#test" ,
122
+ appearance : "link" ,
92
123
disabled : true ,
93
124
} ,
125
+ parameters : {
126
+ docs : {
127
+ description : {
128
+ story : "Disabled button with link appearance" ,
129
+ } ,
130
+ } ,
131
+ } ,
94
132
} ;
95
133
96
134
export const Positive : Story = {
@@ -100,6 +138,13 @@ export const Positive: Story = {
100
138
children : "Positive button" ,
101
139
appearance : "positive" ,
102
140
} ,
141
+ parameters : {
142
+ docs : {
143
+ description : {
144
+ story : "Button with positive appearance" ,
145
+ } ,
146
+ } ,
147
+ } ,
103
148
} ;
104
149
105
150
export const PositiveDisabled : Story = {
@@ -110,6 +155,13 @@ export const PositiveDisabled: Story = {
110
155
appearance : "positive" ,
111
156
disabled : true ,
112
157
} ,
158
+ parameters : {
159
+ docs : {
160
+ description : {
161
+ story : "Disabled button with positive appearance" ,
162
+ } ,
163
+ } ,
164
+ } ,
113
165
} ;
114
166
115
167
export const Negative : Story = {
@@ -119,6 +171,13 @@ export const Negative: Story = {
119
171
children : "Negative button" ,
120
172
appearance : "negative" ,
121
173
} ,
174
+ parameters : {
175
+ docs : {
176
+ description : {
177
+ story : "Button with negative appearance" ,
178
+ } ,
179
+ } ,
180
+ } ,
122
181
} ;
123
182
124
183
export const NegativeDisabled : Story = {
@@ -129,6 +188,13 @@ export const NegativeDisabled: Story = {
129
188
appearance : "negative" ,
130
189
disabled : true ,
131
190
} ,
191
+ parameters : {
192
+ docs : {
193
+ description : {
194
+ story : "Disabled button with negative appearance" ,
195
+ } ,
196
+ } ,
197
+ } ,
132
198
} ;
133
199
134
200
export const Brand : Story = {
@@ -138,6 +204,13 @@ export const Brand: Story = {
138
204
children : "Brand button" ,
139
205
appearance : "brand" ,
140
206
} ,
207
+ parameters : {
208
+ docs : {
209
+ description : {
210
+ story : "Button with brand appearance" ,
211
+ } ,
212
+ } ,
213
+ } ,
141
214
} ;
142
215
143
216
export const BrandDisabled : Story = {
@@ -148,6 +221,13 @@ export const BrandDisabled: Story = {
148
221
appearance : "brand" ,
149
222
disabled : true ,
150
223
} ,
224
+ parameters : {
225
+ docs : {
226
+ description : {
227
+ story : "Disabled button with brand appearance" ,
228
+ } ,
229
+ } ,
230
+ } ,
151
231
} ;
152
232
153
233
export const Inline : Story = {
@@ -161,6 +241,13 @@ export const Inline: Story = {
161
241
) ,
162
242
163
243
name : "Inline" ,
244
+ parameters : {
245
+ docs : {
246
+ description : {
247
+ story : "Button that displays on the same line as the sibling elements" ,
248
+ } ,
249
+ } ,
250
+ } ,
164
251
} ;
165
252
166
253
export const Dense : Story = {
@@ -172,6 +259,13 @@ export const Dense: Story = {
172
259
) ,
173
260
174
261
name : "Dense" ,
262
+ parameters : {
263
+ docs : {
264
+ description : {
265
+ story : "Button with reduced vertical padding" ,
266
+ } ,
267
+ } ,
268
+ } ,
175
269
} ;
176
270
177
271
export const Small : Story = {
@@ -185,6 +279,13 @@ export const Small: Story = {
185
279
) ,
186
280
187
281
name : "Small" ,
282
+ parameters : {
283
+ docs : {
284
+ description : {
285
+ story : "Button that can fit small text inside" ,
286
+ } ,
287
+ } ,
288
+ } ,
188
289
} ;
189
290
190
291
export const Icon : Story = {
@@ -194,6 +295,13 @@ export const Icon: Story = {
194
295
children : < i className = "p-icon--plus" > </ i > ,
195
296
hasIcon : true ,
196
297
} ,
298
+ parameters : {
299
+ docs : {
300
+ description : {
301
+ story : "Button with an icon inside" ,
302
+ } ,
303
+ } ,
304
+ } ,
197
305
} ;
198
306
199
307
export const IconText : Story = {
@@ -208,9 +316,16 @@ export const IconText: Story = {
208
316
209
317
hasIcon : true ,
210
318
} ,
319
+ parameters : {
320
+ docs : {
321
+ description : {
322
+ story : "Button with both an icon and text inside" ,
323
+ } ,
324
+ } ,
325
+ } ,
211
326
} ;
212
327
213
- export const IconWithTooltip : Story = {
328
+ export const DisabledWithTooltip : Story = {
214
329
name : "Disabled with tooltip" ,
215
330
216
331
args : {
@@ -224,4 +339,48 @@ export const IconWithTooltip: Story = {
224
339
</ Tooltip >
225
340
</ div >
226
341
) ,
342
+ parameters : {
343
+ docs : {
344
+ description : {
345
+ story : "Disabled button that displays a tooltip when hovered" ,
346
+ } ,
347
+ } ,
348
+ } ,
349
+ } ;
350
+
351
+ export const ButtonAsLink = {
352
+ name : "Button as link" ,
353
+
354
+ args : {
355
+ children : "Button as link" ,
356
+ appearance : "base" ,
357
+ element : "a" ,
358
+ href : "#test" ,
359
+ } ,
360
+ parameters : {
361
+ docs : {
362
+ description : {
363
+ story : "Button that is rendered as an `a` element" ,
364
+ } ,
365
+ } ,
366
+ } ,
367
+ } ;
368
+
369
+ export const ButtonAsLinkDisabled : Story < HTMLProps < HTMLAnchorElement > > = {
370
+ name : "Button as link disabled" ,
371
+
372
+ args : {
373
+ children : "Button as link disabled" ,
374
+ appearance : "base" ,
375
+ element : "a" ,
376
+ href : "#test" ,
377
+ disabled : true ,
378
+ } ,
379
+ parameters : {
380
+ docs : {
381
+ description : {
382
+ story : "Disabled button that is rendered as an `a` element" ,
383
+ } ,
384
+ } ,
385
+ } ,
227
386
} ;
0 commit comments