Skip to content

Commit 3d66906

Browse files
committed
do not inline in docs for components with portal
1 parent 269d753 commit 3d66906

File tree

2 files changed

+121
-43
lines changed

2 files changed

+121
-43
lines changed

stories/DateInput.stories.tsx

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ const meta: ComponentMeta<typeof DateInput> = {
1212
onValueChange: { action: 'valueChange' },
1313
onComplete: { action: 'complete' },
1414
},
15+
parameters: {
16+
docs: {
17+
inlineStories: false,
18+
iframeHeight: 400,
19+
},
20+
},
1521
};
1622
export default meta;
1723

@@ -25,7 +31,9 @@ export const ControlledWithKnobs: ComponentStoryObj<typeof DateInput> = {
2531
},
2632
parameters: {
2733
docs: {
28-
storyDescription: 'DateInput controlled with knobs',
34+
description: {
35+
story: 'DateInput controlled with knobs',
36+
},
2937
},
3038
},
3139
};
@@ -41,7 +49,9 @@ export const Default: ComponentStoryObj<typeof DateInput> = {
4149
},
4250
parameters: {
4351
docs: {
44-
storyDescription: 'Default date input control',
52+
description: {
53+
story: 'Default date input control',
54+
},
4555
},
4656
},
4757
};
@@ -58,7 +68,9 @@ export const Required: ComponentStoryObj<typeof DateInput> = {
5868
},
5969
parameters: {
6070
docs: {
61-
storyDescription: 'Date input control with required attribute',
71+
description: {
72+
story: 'Date input control with required attribute',
73+
},
6274
},
6375
},
6476
};
@@ -76,7 +88,9 @@ export const Error: ComponentStoryObj<typeof DateInput> = {
7688
},
7789
parameters: {
7890
docs: {
79-
storyDescription: 'Date input control with error message',
91+
description: {
92+
story: 'Date input control with error message',
93+
},
8094
},
8195
},
8296
};
@@ -93,7 +107,9 @@ export const Disabled: ComponentStoryObj<typeof DateInput> = {
93107
},
94108
parameters: {
95109
docs: {
96-
storyDescription: 'Date input control with disabled status',
110+
description: {
111+
story: 'Date input control with disabled status',
112+
},
97113
},
98114
},
99115
};
@@ -111,8 +127,9 @@ export const WithDateFormat: ComponentStoryObj<typeof DateInput> = {
111127
},
112128
parameters: {
113129
docs: {
114-
storyDescription:
115-
'Date input control with date format specified (YYYY.MM.DD)',
130+
description: {
131+
story: 'Date input control with date format specified (YYYY.MM.DD)',
132+
},
116133
},
117134
},
118135
};
@@ -131,7 +148,9 @@ export const WithMinMaxDate: ComponentStoryObj<typeof DateInput> = {
131148
},
132149
parameters: {
133150
docs: {
134-
storyDescription: 'Date input control with minimum date boundary',
151+
description: {
152+
story: 'Date input control with minimum date boundary',
153+
},
135154
},
136155
},
137156
};
@@ -150,7 +169,9 @@ export const IncludeTimeData: ComponentStoryObj<typeof DateInput> = {
150169
},
151170
parameters: {
152171
docs: {
153-
storyDescription: 'Date input control with time information',
172+
description: {
173+
story: 'Date input control with time information',
174+
},
154175
},
155176
},
156177
};

stories/Lookup.stories.tsx

Lines changed: 91 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,12 @@ const meta: ComponentMeta<typeof Lookup> = {
167167
onBlur: { action: 'blur' },
168168
onComplete: { action: 'complete' },
169169
},
170+
parameters: {
171+
docs: {
172+
inlineStories: false,
173+
iframeHeight: 500,
174+
},
175+
},
170176
};
171177
export default meta;
172178

@@ -181,7 +187,9 @@ export const ControlledWithKnobs: ComponentStoryObj<typeof Lookup> = {
181187
},
182188
parameters: {
183189
docs: {
184-
storyDescription: 'Lookup controlled with knobs',
190+
description: {
191+
story: 'Lookup controlled with knobs',
192+
},
185193
},
186194
},
187195
};
@@ -196,7 +204,10 @@ export const Required: ComponentStoryObj<typeof Lookup> = {
196204
},
197205
parameters: {
198206
docs: {
199-
storyDescription: 'Lookup component with required attribute',
207+
description: {
208+
story: 'Lookup component with required attribute',
209+
},
210+
iframeHeight: 120,
200211
},
201212
},
202213
};
@@ -212,7 +223,10 @@ export const Error: ComponentStoryObj<typeof Lookup> = {
212223
},
213224
parameters: {
214225
docs: {
215-
storyDescription: 'Lookup component with error message',
226+
description: {
227+
story: 'Lookup component with error message',
228+
},
229+
iframeHeight: 120,
216230
},
217231
},
218232
};
@@ -227,7 +241,10 @@ export const Disabled: ComponentStoryObj<typeof Lookup> = {
227241
},
228242
parameters: {
229243
docs: {
230-
storyDescription: 'Lookup component with disabled status',
244+
description: {
245+
story: 'Lookup component with disabled status',
246+
},
247+
iframeHeight: 120,
231248
},
232249
},
233250
};
@@ -243,7 +260,10 @@ export const WithSearchText: ComponentStoryObj<typeof Lookup> = {
243260
},
244261
parameters: {
245262
docs: {
246-
storyDescription: 'Lookup component with search input text',
263+
description: {
264+
story: 'Lookup component with search input text',
265+
},
266+
iframeHeight: 120,
247267
},
248268
},
249269
};
@@ -260,8 +280,10 @@ export const WithSearchIconInLeft: ComponentStoryObj<typeof Lookup> = {
260280
},
261281
parameters: {
262282
docs: {
263-
storyDescription:
264-
'Lookup component with search text and search icon in left side',
283+
description: {
284+
story: 'Lookup component with search text and search icon in left side',
285+
},
286+
iframeHeight: 120,
265287
},
266288
},
267289
};
@@ -277,7 +299,10 @@ export const WithSelection: ComponentStoryObj<typeof Lookup> = {
277299
},
278300
parameters: {
279301
docs: {
280-
storyDescription: 'Lookup component with item selected',
302+
description: {
303+
story: 'Lookup component with item selected',
304+
},
305+
iframeHeight: 120,
281306
},
282307
},
283308
};
@@ -295,7 +320,10 @@ export const OpenedInLoading: ComponentStoryObj<typeof Lookup> = {
295320
},
296321
parameters: {
297322
docs: {
298-
storyDescription: 'Lookup component in loading candidates',
323+
description: {
324+
story: 'Lookup component in loading candidates',
325+
},
326+
iframeHeight: 150,
299327
},
300328
},
301329
};
@@ -315,7 +343,9 @@ export const OpenedActive: ComponentStoryObj<typeof Lookup> = {
315343
decorators: [containerDecorator({ height: 350 })],
316344
parameters: {
317345
docs: {
318-
storyDescription: 'Lookup component with candidates in dropdown',
346+
description: {
347+
story: 'Lookup component with candidates in dropdown',
348+
},
319349
},
320350
},
321351
};
@@ -345,8 +375,10 @@ export const OpenedWithListHeaderFooter: ComponentStoryObj<typeof Lookup> = {
345375
decorators: [containerDecorator({ height: 420 })],
346376
parameters: {
347377
docs: {
348-
storyDescription:
349-
'Lookup component with header/footer component in the candidate list',
378+
description: {
379+
story:
380+
'Lookup component with header/footer component in the candidate list',
381+
},
350382
},
351383
},
352384
};
@@ -364,8 +396,10 @@ export const DefaultOpenedInLoading: ComponentStoryObj<typeof Lookup> = {
364396
},
365397
parameters: {
366398
docs: {
367-
storyDescription:
368-
'Lookup component (defaultOpened = true) in loading candidates',
399+
description: {
400+
story: 'Lookup component (defaultOpened = true) in loading candidates',
401+
},
402+
iframeHeight: 150,
369403
},
370404
},
371405
};
@@ -385,8 +419,10 @@ export const DefaultOpenedActive: ComponentStoryObj<typeof Lookup> = {
385419
decorators: [containerDecorator({ height: 350 })],
386420
parameters: {
387421
docs: {
388-
storyDescription:
389-
'Lookup component (defaultOpened = true) with candidates in dropdown',
422+
description: {
423+
story:
424+
'Lookup component (defaultOpened = true) with candidates in dropdown',
425+
},
390426
},
391427
},
392428
};
@@ -418,8 +454,10 @@ export const DefaultOpenedWithListHeaderFooter: ComponentStoryObj<
418454
},
419455
parameters: {
420456
docs: {
421-
storyDescription:
422-
'Lookup component (defaultOpened = true) with header/footer component in the candidate list',
457+
description: {
458+
story:
459+
'Lookup component (defaultOpened = true) with header/footer component in the candidate list',
460+
},
423461
},
424462
},
425463
};
@@ -437,8 +475,11 @@ export const MultiScope: ComponentStoryObj<typeof Lookup> = {
437475
},
438476
parameters: {
439477
docs: {
440-
storyDescription:
441-
'Lookup component which allows multiples scopes to select as lookup datasource',
478+
description: {
479+
story:
480+
'Lookup component which allows multiples scopes to select as lookup datasource',
481+
},
482+
iframeHeight: 120,
442483
},
443484
},
444485
};
@@ -457,8 +498,11 @@ export const MultiScopeRequired: ComponentStoryObj<typeof Lookup> = {
457498
},
458499
parameters: {
459500
docs: {
460-
storyDescription:
461-
'Lookup component which allows multiples scopes selection, with required attribute',
501+
description: {
502+
story:
503+
'Lookup component which allows multiples scopes selection, with required attribute',
504+
},
505+
iframeHeight: 120,
462506
},
463507
},
464508
};
@@ -478,8 +522,11 @@ export const MultiScopeError: ComponentStoryObj<typeof Lookup> = {
478522
},
479523
parameters: {
480524
docs: {
481-
storyDescription:
482-
'Lookup component which allows multiples scopes selection, with error message',
525+
description: {
526+
story:
527+
'Lookup component which allows multiples scopes selection, with error message',
528+
},
529+
iframeHeight: 120,
483530
},
484531
},
485532
};
@@ -498,8 +545,11 @@ export const MultiScopeDisabled: ComponentStoryObj<typeof Lookup> = {
498545
},
499546
parameters: {
500547
docs: {
501-
storyDescription:
502-
'Lookup component which allows multiples scopes selection, but in disabled status',
548+
description: {
549+
story:
550+
'Lookup component which allows multiples scopes selection, but in disabled status',
551+
},
552+
iframeHeight: 120,
503553
},
504554
},
505555
};
@@ -518,8 +568,9 @@ export const Controlled: ComponentStoryObj<typeof Lookup> = {
518568
},
519569
parameters: {
520570
docs: {
521-
storyDescription:
522-
'Lookup component whose state is controlled from outside',
571+
description: {
572+
story: 'Lookup component whose state is controlled from outside',
573+
},
523574
},
524575
},
525576
};
@@ -538,8 +589,10 @@ export const Uncontrolled: ComponentStoryObj<typeof Lookup> = {
538589
},
539590
parameters: {
540591
docs: {
541-
storyDescription:
542-
'Lookup component whose state is managed inside of the component',
592+
description: {
593+
story:
594+
'Lookup component whose state is managed inside of the component',
595+
},
543596
},
544597
},
545598
};
@@ -556,8 +609,10 @@ export const ControlledWithMultiScope: ComponentStoryObj<typeof Lookup> = {
556609
},
557610
parameters: {
558611
docs: {
559-
storyDescription:
560-
'Lookup component whose state is controlled from outside, search scope is selectable from multiple scope',
612+
description: {
613+
story:
614+
'Lookup component whose state is controlled from outside, search scope is selectable from multiple scope',
615+
},
561616
},
562617
},
563618
};
@@ -580,8 +635,10 @@ export const UncontrolledWithMultiScope: ComponentStoryObj<typeof Lookup> = {
580635
},
581636
parameters: {
582637
docs: {
583-
storyDescription:
584-
'Lookup component whose state is managed inside of the component, search scope is selectable from multiple scope',
638+
description: {
639+
story:
640+
'Lookup component whose state is managed inside of the component, search scope is selectable from multiple scope',
641+
},
585642
},
586643
},
587644
};

0 commit comments

Comments
 (0)