Dan Abramov
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
8 additions and
2 deletions
-
content/docs/nav.yml
-
src/templates/components/Sidebar/Section.js
|
|
@ -9,6 +9,7 @@ |
|
|
|
- id: cdn-links |
|
|
|
title: CDN Links |
|
|
|
- title: Main Concepts |
|
|
|
isOrdered: true |
|
|
|
items: |
|
|
|
- id: hello-world |
|
|
|
title: Hello World |
|
|
|
|
|
@ -69,7 +69,7 @@ class Section extends React.Component { |
|
|
|
display: isActive ? 'block' : 'none', |
|
|
|
}, |
|
|
|
}}> |
|
|
|
{section.items.map(item => ( |
|
|
|
{section.items.map((item, index) => ( |
|
|
|
<li |
|
|
|
key={item.id} |
|
|
|
css={{ |
|
|
@ -79,7 +79,12 @@ class Section extends React.Component { |
|
|
|
isActive: isScrollSync |
|
|
|
? activeItemId === item.id |
|
|
|
: isItemActive(location, item), |
|
|
|
item, |
|
|
|
item: section.isOrdered |
|
|
|
? { |
|
|
|
...item, |
|
|
|
title: `${index + 1}. ${item.title}`, |
|
|
|
} |
|
|
|
: item, |
|
|
|
location, |
|
|
|
onLinkClick, |
|
|
|
section, |
|
|
|