mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-09 22:32:53 +02:00
feat(v2): allow non sidebar category to be first item of sidebar (#2032)
* feat(v2): allow non sidebar category to be first item of sidebar * better error messages * edit the react component * Update website/docs/sidebar.md * nits * add @babel/plugin-transform-runtime
This commit is contained in:
parent
c533adc4aa
commit
9862a6821a
20 changed files with 849 additions and 671 deletions
|
@ -171,19 +171,16 @@ function DocSidebar(props) {
|
|||
)}
|
||||
</button>
|
||||
<ul className="menu__list">
|
||||
{sidebarData.map(
|
||||
item =>
|
||||
item.items.length > 0 && (
|
||||
<DocSidebarItem
|
||||
key={item.label}
|
||||
item={item}
|
||||
onItemClick={() => {
|
||||
setShowResponsiveSidebar(false);
|
||||
}}
|
||||
collapsible={sidebarCollapsible}
|
||||
/>
|
||||
),
|
||||
)}
|
||||
{sidebarData.map(item => (
|
||||
<DocSidebarItem
|
||||
key={item.label}
|
||||
item={item}
|
||||
onItemClick={() => {
|
||||
setShowResponsiveSidebar(false);
|
||||
}}
|
||||
collapsible={sidebarCollapsible}
|
||||
/>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue