File tree 1 file changed +37
-36
lines changed
1 file changed +37
-36
lines changed Original file line number Diff line number Diff line change @@ -139,42 +139,43 @@ class Accordion extends React.Component {
139
139
uid = { uid }
140
140
disableAccordions = { disableAccordions }
141
141
/>
142
- < ul
143
- id = { uid }
144
- sx = { {
145
- display : isExpanded ? `block` : `none` ,
146
- listStyle : `none` ,
147
- margin : 0 ,
148
- position : `relative` ,
149
- ...( item . ui === `steps` && {
150
- "&:after" : {
151
- backgroundColor : `ui.border` ,
152
- bottom : 0 ,
153
- content : `''` ,
154
- left : 27 ,
155
- position : `absolute` ,
156
- top : 0 ,
157
- width : 1 ,
158
- } ,
159
- } ) ,
160
- } }
161
- >
162
- { item . items . map ( subitem => (
163
- < Item
164
- activeItemLink = { activeItemLink }
165
- activeItemParents = { activeItemParents }
166
- createLink = { createLink }
167
- item = { subitem }
168
- key = { subitem . title }
169
- location = { location }
170
- onLinkClick = { onLinkClick }
171
- isExpanded = { isExpanded }
172
- onSectionTitleClick = { onSectionTitleClick }
173
- openSectionHash = { openSectionHash }
174
- ui = { item . ui }
175
- />
176
- ) ) }
177
- </ ul >
142
+ { isExpanded && (
143
+ < ul
144
+ id = { uid }
145
+ sx = { {
146
+ listStyle : `none` ,
147
+ margin : 0 ,
148
+ position : `relative` ,
149
+ ...( item . ui === `steps` && {
150
+ "&:after" : {
151
+ backgroundColor : `ui.border` ,
152
+ bottom : 0 ,
153
+ content : `''` ,
154
+ left : 27 ,
155
+ position : `absolute` ,
156
+ top : 0 ,
157
+ width : 1 ,
158
+ } ,
159
+ } ) ,
160
+ } }
161
+ >
162
+ { item . items . map ( subitem => (
163
+ < Item
164
+ activeItemLink = { activeItemLink }
165
+ activeItemParents = { activeItemParents }
166
+ createLink = { createLink }
167
+ item = { subitem }
168
+ key = { subitem . title }
169
+ location = { location }
170
+ onLinkClick = { onLinkClick }
171
+ isExpanded = { isExpanded }
172
+ onSectionTitleClick = { onSectionTitleClick }
173
+ openSectionHash = { openSectionHash }
174
+ ui = { item . ui }
175
+ />
176
+ ) ) }
177
+ </ ul >
178
+ ) }
178
179
</ li >
179
180
)
180
181
}
You can’t perform that action at this time.
0 commit comments