File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed
packages/@react-spectrum/tabs/stories Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change @@ -402,6 +402,55 @@ Links.story = {
402
402
}
403
403
} ;
404
404
405
+ export const Nested = ( props ) => {
406
+ return (
407
+ < Tabs aria-label = "Some tabs" width = { '500px' } { ...props } >
408
+ < TabList >
409
+ < Item key = "one" > Tab 1</ Item >
410
+ < Item key = "two" > Tab 2</ Item >
411
+ < Item key = "three" > Tab 3</ Item >
412
+ < Item key = "four" > Tab 4</ Item >
413
+ < Item key = "five" > Tab 5</ Item >
414
+ </ TabList >
415
+ < TabPanels >
416
+ < Item key = "one" >
417
+ < Heading > Nested</ Heading >
418
+ < Tabs { ...props } >
419
+ < TabList >
420
+ < Item > Tab 1</ Item >
421
+ < Item > Tab 2</ Item >
422
+ </ TabList >
423
+ < TabPanels >
424
+ < Item >
425
+ < TextField label = "Tab 1" />
426
+ </ Item >
427
+ < Item >
428
+ < TextField label = "Tab 2" />
429
+ </ Item >
430
+ </ TabPanels >
431
+ </ Tabs >
432
+ </ Item >
433
+ < Item key = "two" >
434
+ < Heading > Bar</ Heading >
435
+ < Text > To bar or not to bar.</ Text >
436
+ </ Item >
437
+ < Item key = "three" >
438
+ < Heading > Foobar</ Heading >
439
+ < Text > That is the foobar.</ Text >
440
+ </ Item >
441
+ < Item key = "four" >
442
+ < Heading > Foofoo</ Heading >
443
+ < Text > Once more foo upon the foo.</ Text >
444
+ </ Item >
445
+ < Item key = "five" >
446
+ < Heading > Barfoo</ Heading >
447
+ < Text > What's he that barfoos so?</ Text >
448
+ </ Item >
449
+ </ TabPanels >
450
+ </ Tabs >
451
+ ) ;
452
+ } ;
453
+
405
454
function render ( props = { } ) {
406
455
return (
407
456
< Tabs
You can’t perform that action at this time.
0 commit comments