@@ -48,150 +48,148 @@ export const Playground: Story = {
4848export const EdgeCaseTesting : Story = {
4949 render : ( { ...args } ) => (
5050 < EuiCollapsibleNavBeta >
51- < div className = "eui-yScroll" >
52- < EuiCollapsibleNavItem { ...args } href = "#" title = "Link with no icon" />
53- < EuiCollapsibleNavItem
54- { ...args }
55- href = "#"
56- title = "Link with icon"
57- icon = "home"
58- />
59- < EuiCollapsibleNavItem
60- { ...args }
61- title = "External link with icon"
62- icon = "link"
63- href = "#"
64- linkProps = { { target : '_blank' } }
65- />
66- < EuiCollapsibleNavItem
67- { ...args }
68- onClick = { ( ) => { } }
69- title = "Button with no icon"
70- />
71- < EuiCollapsibleNavItem
72- { ...args }
73- linkProps = { { onClick : ( ) => { } } }
74- title = "Button with icon"
75- icon = "home"
76- />
77- < EuiCollapsibleNavItem
78- { ...args }
79- title = "Accordion with no icon"
80- items = { [
81- { ...args , title : 'Link with no icon' , href : '#' } ,
82- { ...args , title : 'Link with icon' , href : '#' , icon : 'alert' } ,
83- ] }
84- />
85- < EuiCollapsibleNavItem
86- { ...args }
87- title = "Accordion with icon"
88- icon = "clock"
89- items = { [
90- { ...args , title : 'Link with no icon' , href : '#' } ,
91- { ...args , title : 'Link with icon' , href : '#' , icon : 'alert' } ,
92- ] }
93- />
94- < EuiCollapsibleNavItem
95- { ...args }
96- title = "Accordion with nested accordions"
97- accordionProps = { { initialIsOpen : true } }
98- items = { [
99- { ...args , title : 'Link' , href : '#' , isSelected : true } ,
100- { ...args , title : 'Button' , onClick : ( ) => { } } ,
101- { ...args , title : 'Span' , href : '#' } ,
102- {
103- title : 'Section 2' ,
104- isGroupTitle : true ,
105- } ,
106- {
107- ...args ,
108- title : 'Test 2' ,
109- href : '#' ,
110- linkProps : { target : '_blank' } ,
111- } ,
112- { ...args , title : 'Not a link' } ,
113- {
114- ...args ,
115- title : 'Nested accordion - span' ,
116- items : [ { title : 'grandchild' } , { title : 'grandchild 2' } ] ,
117- } ,
118- {
119- ...args ,
120- title : 'Nested accordion - link' ,
121- href : '#' ,
122- items : [
123- { title : 'grandchild' , href : '#' } ,
124- { title : 'grandchild 2' , href : '#' } ,
125- ] ,
126- } ,
127- {
128- title : 'Section 3' ,
129- titleElement : 'h3' ,
130- isGroupTitle : true ,
131- } ,
132- {
133- ...args ,
134- title : 'Nested accordion with grandchildren' ,
135- accordionProps : { initialIsOpen : true } ,
136- items : [
137- { title : 'grandchild' } ,
138- { title : 'grandchild 2' , isSelected : true } ,
139- {
140- title : 'Nested nested accordion' ,
141- accordionProps : { initialIsOpen : true } ,
142- items : [
143- {
144- title : 'greatgrandchild truncation testing' ,
145- href : '#' ,
146- linkProps : { target : '_blank' } ,
147- isSelected : true ,
148- } ,
149- ] ,
150- } ,
151- ] ,
152- } ,
153- ] }
154- />
155- < EuiCollapsibleNavItem
156- { ...args }
157- title = "Accordion with icon and link"
158- href = "#"
159- items = { [
160- { ...args , title : 'Link with no icon' , href : '#' } ,
161- { ...args , title : 'Link with icon' , href : '#' , icon : 'alert' } ,
162- ] }
163- />
164- < EuiCollapsibleNavItem
165- { ...args }
166- title = "Accordion with icon and external link"
167- href = "#"
168- linkProps = { { target : '_blank' } } // hmm
169- items = { [
170- { ...args , title : 'Link with no icon' , href : '#' } ,
171- { ...args , title : 'Link with icon' , href : '#' , icon : 'alert' } ,
172- ] }
173- />
174- < EuiCollapsibleNavItem
175- { ...args }
176- title = "Accordion with no items"
177- href = "#"
178- items = { [ ] }
179- />
180- < EuiCollapsibleNavItem
181- { ...args }
182- title = "Accordion with no items and no link"
183- items = { [ ] }
184- />
185- < EuiCollapsibleNavItem
186- { ...args }
187- title = "No link or accordion, very very long truncated text"
188- icon = "home"
189- />
190- < EuiCollapsibleNavItem
191- { ...args }
192- title = "No icon, very very long truncated text"
193- />
194- </ div >
51+ < EuiCollapsibleNavItem { ...args } href = "#" title = "Link with no icon" />
52+ < EuiCollapsibleNavItem
53+ { ...args }
54+ href = "#"
55+ title = "Link with icon"
56+ icon = "home"
57+ />
58+ < EuiCollapsibleNavItem
59+ { ...args }
60+ title = "External link with icon"
61+ icon = "link"
62+ href = "#"
63+ linkProps = { { target : '_blank' } }
64+ />
65+ < EuiCollapsibleNavItem
66+ { ...args }
67+ onClick = { ( ) => { } }
68+ title = "Button with no icon"
69+ />
70+ < EuiCollapsibleNavItem
71+ { ...args }
72+ linkProps = { { onClick : ( ) => { } } }
73+ title = "Button with icon"
74+ icon = "home"
75+ />
76+ < EuiCollapsibleNavItem
77+ { ...args }
78+ title = "Accordion with no icon"
79+ items = { [
80+ { ...args , title : 'Link with no icon' , href : '#' } ,
81+ { ...args , title : 'Link with icon' , href : '#' , icon : 'alert' } ,
82+ ] }
83+ />
84+ < EuiCollapsibleNavItem
85+ { ...args }
86+ title = "Accordion with icon"
87+ icon = "clock"
88+ items = { [
89+ { ...args , title : 'Link with no icon' , href : '#' } ,
90+ { ...args , title : 'Link with icon' , href : '#' , icon : 'alert' } ,
91+ ] }
92+ />
93+ < EuiCollapsibleNavItem
94+ { ...args }
95+ title = "Accordion with nested accordions"
96+ accordionProps = { { initialIsOpen : true } }
97+ items = { [
98+ { ...args , title : 'Link' , href : '#' , isSelected : true } ,
99+ { ...args , title : 'Button' , onClick : ( ) => { } } ,
100+ { ...args , title : 'Span' , href : '#' } ,
101+ {
102+ title : 'Section 2' ,
103+ isGroupTitle : true ,
104+ } ,
105+ {
106+ ...args ,
107+ title : 'Test 2' ,
108+ href : '#' ,
109+ linkProps : { target : '_blank' } ,
110+ } ,
111+ { ...args , title : 'Not a link' } ,
112+ {
113+ ...args ,
114+ title : 'Nested accordion - span' ,
115+ items : [ { title : 'grandchild' } , { title : 'grandchild 2' } ] ,
116+ } ,
117+ {
118+ ...args ,
119+ title : 'Nested accordion - link' ,
120+ href : '#' ,
121+ items : [
122+ { title : 'grandchild' , href : '#' } ,
123+ { title : 'grandchild 2' , href : '#' } ,
124+ ] ,
125+ } ,
126+ {
127+ title : 'Section 3' ,
128+ titleElement : 'h3' ,
129+ isGroupTitle : true ,
130+ } ,
131+ {
132+ ...args ,
133+ title : 'Nested accordion with grandchildren' ,
134+ accordionProps : { initialIsOpen : true } ,
135+ items : [
136+ { title : 'grandchild' } ,
137+ { title : 'grandchild 2' , isSelected : true } ,
138+ {
139+ title : 'Nested nested accordion' ,
140+ accordionProps : { initialIsOpen : true } ,
141+ items : [
142+ {
143+ title : 'greatgrandchild truncation testing' ,
144+ href : '#' ,
145+ linkProps : { target : '_blank' } ,
146+ isSelected : true ,
147+ } ,
148+ ] ,
149+ } ,
150+ ] ,
151+ } ,
152+ ] }
153+ />
154+ < EuiCollapsibleNavItem
155+ { ...args }
156+ title = "Accordion with icon and link"
157+ href = "#"
158+ items = { [
159+ { ...args , title : 'Link with no icon' , href : '#' } ,
160+ { ...args , title : 'Link with icon' , href : '#' , icon : 'alert' } ,
161+ ] }
162+ />
163+ < EuiCollapsibleNavItem
164+ { ...args }
165+ title = "Accordion with icon and external link"
166+ href = "#"
167+ linkProps = { { target : '_blank' } } // hmm
168+ items = { [
169+ { ...args , title : 'Link with no icon' , href : '#' } ,
170+ { ...args , title : 'Link with icon' , href : '#' , icon : 'alert' } ,
171+ ] }
172+ />
173+ < EuiCollapsibleNavItem
174+ { ...args }
175+ title = "Accordion with no items"
176+ href = "#"
177+ items = { [ ] }
178+ />
179+ < EuiCollapsibleNavItem
180+ { ...args }
181+ title = "Accordion with no items and no link"
182+ items = { [ ] }
183+ />
184+ < EuiCollapsibleNavItem
185+ { ...args }
186+ title = "No link or accordion, very very long truncated text"
187+ icon = "home"
188+ />
189+ < EuiCollapsibleNavItem
190+ { ...args }
191+ title = "No icon, very very long truncated text"
192+ />
195193 </ EuiCollapsibleNavBeta >
196194 ) ,
197195} ;
0 commit comments