File tree Expand file tree Collapse file tree
packages/docusaurus-theme-openapi-docs/src/theme Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -209,13 +209,7 @@ function TabContent({
209209 return cloneElement ( selectedTabItem , { className : "margin-top--md" } ) ;
210210 }
211211 return (
212- < div className = "margin-top--md openapi-tabs__code-content" >
213- { childTabs . map ( ( tabItem , i ) =>
214- cloneElement ( tabItem , {
215- key : i ,
216- } )
217- ) }
218- </ div >
212+ < div className = "margin-top--md openapi-tabs__code-content" > { childTabs } </ div >
219213 ) ;
220214}
221215
Original file line number Diff line number Diff line change @@ -210,15 +210,7 @@ function TabContent({
210210 }
211211 return cloneElement ( selectedTabItem , { className : "margin-top--md" } ) ;
212212 }
213- return (
214- < div className = "margin-top--md" >
215- { childTabs . map ( ( tabItem , i ) =>
216- cloneElement ( tabItem , {
217- key : i ,
218- } )
219- ) }
220- </ div >
221- ) ;
213+ return < div className = "margin-top--md" > { childTabs } </ div > ;
222214}
223215function TabsComponent ( props : TabListProps ) : React . JSX . Element {
224216 const tabs = useTabsContextValue ( props ) ;
Original file line number Diff line number Diff line change @@ -189,15 +189,7 @@ function TabContent({
189189 }
190190 return cloneElement ( selectedTabItem , { className : "margin-top--md" } ) ;
191191 }
192- return (
193- < div className = "margin-top--md" >
194- { childTabs . map ( ( tabItem , i ) =>
195- cloneElement ( tabItem , {
196- key : i ,
197- } )
198- ) }
199- </ div >
200- ) ;
192+ return < div className = "margin-top--md" > { childTabs } </ div > ;
201193}
202194function TabsComponent ( props : TabProps ) : React . JSX . Element {
203195 const tabs = useTabsContextValue ( props ) ;
Original file line number Diff line number Diff line change @@ -225,15 +225,7 @@ function TabContent({
225225 }
226226 return cloneElement ( selectedTabItem , { className : "margin-top--md" } ) ;
227227 }
228- return (
229- < div className = "margin-top--md" >
230- { childTabs . map ( ( tabItem , i ) =>
231- cloneElement ( tabItem , {
232- key : i ,
233- } )
234- ) }
235- </ div >
236- ) ;
228+ return < div className = "margin-top--md" > { childTabs } </ div > ;
237229}
238230function TabsComponent ( props : Props & TabProps ) : React . JSX . Element {
239231 const tabs = useTabsContextValue ( props ) ;
Original file line number Diff line number Diff line change @@ -187,15 +187,7 @@ function TabContent({
187187 }
188188 return cloneElement ( selectedTabItem , { className : "margin-top--md" } ) ;
189189 }
190- return (
191- < div className = "margin-top--md" >
192- { childTabs . map ( ( tabItem , i ) =>
193- cloneElement ( tabItem , {
194- key : i ,
195- } )
196- ) }
197- </ div >
198- ) ;
190+ return < div className = "margin-top--md" > { childTabs } </ div > ;
199191}
200192function TabsComponent ( props : TabProps ) : React . JSX . Element {
201193 const tabs = useTabsContextValue ( props ) ;
Original file line number Diff line number Diff line change @@ -204,15 +204,7 @@ function TabContent({
204204 }
205205 return cloneElement ( selectedTabItem , { className : "margin-top--md" } ) ;
206206 }
207- return (
208- < div className = "margin-top--md" >
209- { childTabs . map ( ( tabItem , i ) =>
210- cloneElement ( tabItem , {
211- key : i ,
212- } )
213- ) }
214- </ div >
215- ) ;
207+ return < div className = "margin-top--md" > { childTabs } </ div > ;
216208}
217209function TabsComponent ( props : SchemaTabsProps ) : React . JSX . Element {
218210 const tabs = useTabsContextValue ( props ) ;
You can’t perform that action at this time.
0 commit comments